diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-14 16:00:31 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-14 16:00:31 -0400 |
| commit | d944af860934fdf8a3a38fc48a0b158428d90a0f (patch) | |
| tree | 6f6fcdf7f4ea23aad39befbe1478d36caf3ed575 /redo/control_windows.c | |
| parent | 52339e1f11829e1442c68259632ab9b5b9416e0e (diff) | |
Split out common container window procedure code in Windows to its own function.
Diffstat (limited to 'redo/control_windows.c')
| -rw-r--r-- | redo/control_windows.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/redo/control_windows.c b/redo/control_windows.c index 594cd1a..03af5c6 100644 --- a/redo/control_windows.c +++ b/redo/control_windows.c @@ -34,31 +34,6 @@ void controlSetControlFont(HWND which) SendMessageW(which, WM_SETFONT, (WPARAM) controlFont, TRUE); } -/* -all controls that have events receive the events themselves through subclasses -to do this, all windows (including the message-only window; see http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q104069) forward WM_COMMAND to each control with this function -*/ -LRESULT forwardCommand(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - HWND control = (HWND) lParam; - - // don't generate an event if the control (if there is one) is unparented (a child of the message-only window) - if (control != NULL && IsChild(msgwin, control) == 0) - return SendMessageW(control, msgCOMMAND, wParam, lParam); - return DefWindowProcW(hwnd, uMsg, wParam, lParam); -} - -LRESULT forwardNotify(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - NMHDR *nmhdr = (NMHDR *) lParam; - HWND control = nmhdr->hwndFrom; - - // don't generate an event if the control (if there is one) is unparented (a child of the message-only window) - if (control != NULL && IsChild(msgwin, control) == 0) - return SendMessageW(control, msgNOTIFY, wParam, lParam); - return DefWindowProcW(hwnd, uMsg, wParam, lParam); -} - void moveWindow(HWND hwnd, int x, int y, int width, int height) { if (MoveWindow(hwnd, x, y, width, height, TRUE) == 0) |
