diff --git a/box.c b/box.c index e491cf5b..53669d3b 100644 --- a/box.c +++ b/box.c @@ -3,7 +3,7 @@ #include "uipriv.h" // TODOs -// - setting padded doesn't take effect immediately on OS X +// - setting padded doesn't take effect immediately on Windows and OS X // TODO remove these typedef struct box box; diff --git a/windows/OLDcontainer.c b/windows/OLDcontainer.c index 281b1704..3c564be2 100644 --- a/windows/OLDcontainer.c +++ b/windows/OLDcontainer.c @@ -65,19 +65,6 @@ static LRESULT CALLBACK parentWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA // these must always be executed, even on the initial parent // why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx switch (uMsg) { - case WM_COMMAND: - // bounce back to the control in question - // except if to the initial parent, in which case act as if the message was ignored - control = (HWND) lParam; - if (control != NULL && IsChild(initialOSContainer, control) == 0) - return SendMessageW(control, msgCOMMAND, wParam, lParam); - return DefWindowProcW(hwnd, uMsg, wParam, lParam); - case WM_NOTIFY: - // same as WM_COMMAND - control = nm->hwndFrom; - if (control != NULL && IsChild(initialOSContainer, control) == 0) - return SendMessageW(control, msgNOTIFY, wParam, lParam); - return DefWindowProcW(hwnd, uMsg, wParam, lParam); case WM_CTLCOLORSTATIC: case WM_CTLCOLORBTN: /*TODO // read-only TextFields and Textboxes are exempt diff --git a/windows/container.c b/windows/container.c index b9c93b5b..ae09a8ff 100644 --- a/windows/container.c +++ b/windows/container.c @@ -58,6 +58,8 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP uiContainer *cc; struct container *c; CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam; + HWND control; + NMHDR *nm = (NMHDR *) lParam; WINDOWPOS *wp = (WINDOWPOS *) lParam; RECT r; @@ -72,7 +74,20 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP switch (uMsg) { // these must always be run, even on the initial parent // why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx - // TODO + case WM_COMMAND: + // bounce back to the control in question + // except if to the initial parent, in which case act as if the message was ignored + control = (HWND) lParam; + if (control != NULL && IsChild(initialParent, control) == 0) + return SendMessageW(control, msgCOMMAND, wParam, lParam); + break; // fall through to DefWindowProcW() + case WM_NOTIFY: + // same as WM_COMMAND + control = nm->hwndFrom; + if (control != NULL && IsChild(initialParent, control) == 0) + return SendMessageW(control, msgNOTIFY, wParam, lParam); + break; + // these are only run if c is not NULL case WM_WINDOWPOSCHANGED: if ((wp->flags & SWP_NOSIZE) != 0)