diff options
Diffstat (limited to 'wintable/api.h')
| -rw-r--r-- | wintable/api.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wintable/api.h b/wintable/api.h index 7ec9afc..fb0e1c0 100644 --- a/wintable/api.h +++ b/wintable/api.h @@ -33,3 +33,20 @@ HANDLER(apiHandlers) } return FALSE; } + +static LRESULT notify(struct table *t, UINT code, intptr_t row, intptr_t column, uintptr_t data) +{ + tableNM nm; + + ZeroMemory(&nm, sizeof (tableNM)); + nm.nmhdr.hwndFrom = t->hwnd; + // TODO check for error from here? 0 is a valid ID (IDCANCEL) + nm.nmhdr.idFrom = GetDlgCtrlID(t->hwnd); + nm.nmhdr.code = code; + nm.row = row; + nm.column = column; + nm.columnType = t->columnTypes[nm.column]; + nm.data = data; + // TODO check for error from GetParent()? + return SendMessageW(GetParent(t->hwnd), WM_NOTIFY, (WPARAM) (nm.nmhdr.idFrom), (LPARAM) (&nm)); +} |
