summaryrefslogtreecommitdiff
path: root/new/newcontrol_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-09 19:07:41 -0400
committerPietro Gagliardi <[email protected]>2015-04-09 19:07:41 -0400
commite78b625172199f77989015cc7ff817530eecaafd (patch)
tree9b1d739066ca75bbe8f57647079aebf6fd2e4a1f /new/newcontrol_windows.c
parent7400cda3dad212b58ebef5cabe1d66ebc4b9d69b (diff)
Changed onWM_NOTIFY() to only pass the NMHDR * in. The LPARAM is more useful as a NMHDR *, and the WPARAM contains duplicate data (http://blogs.msdn.com/b/oldnewthing/archive/2013/12/04/10473637.aspx). Ideally we wouldn't even have the NMHDR.idFrom (see previous commit message), but oh well :/
Diffstat (limited to 'new/newcontrol_windows.c')
-rw-r--r--new/newcontrol_windows.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/new/newcontrol_windows.c b/new/newcontrol_windows.c
index f95f67f..0122db7 100644
--- a/new/newcontrol_windows.c
+++ b/new/newcontrol_windows.c
@@ -6,7 +6,7 @@ typedef struct singleHWND singleHWND;
struct singleHWND {
HWND hwnd;
BOOL (*onWM_COMMAND)(uiControl *, WORD, LRESULT *);
- BOOL (*onWM_NOTIFY)(uiControl *, WPARAM, LPARAM, LRESULT *);
+ BOOL (*onWM_NOTIFY)(uiControl *, NMHDR *, LRESULT *);
void (*onWM_DESTROY)(uiControl *);
uintptr_t parent;
};
@@ -69,7 +69,7 @@ static LRESULT CALLBACK singleSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return lResult;
break;
case msgNOTIFY:
- if ((*(s->onWM_NOTIFY))(c, wParam, lParam, &lResult) != FALSE)
+ if ((*(s->onWM_NOTIFY))(c, (NMHDR *) lParam, &lResult) != FALSE)
return lResult;
break;
case WM_DESTROY: