From 7400cda3dad212b58ebef5cabe1d66ebc4b9d69b Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 9 Apr 2015 18:54:14 -0400 Subject: Changed onWM_COMMAND() to give our controls only the notification code. We don't want to give the control the ID part of wParam because that's (or that'll be) dynamically assigned based on control parenting and prior controls; we don't want to give the control the LPARAM since that contains the window handle and uiControl already has that. --- new/checkbox_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'new/checkbox_windows.c') diff --git a/new/checkbox_windows.c b/new/checkbox_windows.c index 55699a6..abe128d 100644 --- a/new/checkbox_windows.c +++ b/new/checkbox_windows.c @@ -6,13 +6,13 @@ struct checkbox { void *onToggledData; }; -static BOOL onWM_COMMAND(uiControl *c, WPARAM wParam, LPARAM lParam, LRESULT *lResult) +static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult) { struct checkbox *cc = (struct checkbox *) (c->data); HWND hwnd; WPARAM check; - if (HIWORD(wParam) != BN_CLICKED) + if (code != BN_CLICKED) return FALSE; // we didn't use BS_AUTOCHECKBOX (see controls_windows.go) so we have to manage the check state ourselves -- cgit v1.2.3