diff options
| author | Pietro Gagliardi <[email protected]> | 2015-01-07 17:05:38 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-01-07 17:05:38 -0500 |
| commit | 4f557f484c65e11f7ba35aa3aca8c72a6ad2a73e (patch) | |
| tree | e8667618007ed782cf29e76683f03ac2cb5b475b /wintable/api.h | |
| parent | 3b81ebab986d619742fffc052d4fca6a8c5080fd (diff) | |
Added facilities for notifications.
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)); +} |
