From: Vadim Zeitlin <vadim@wxwidgets.org> Date: Thu, 27 Jun 2002 23:40:55 +0000 (+0000) Subject: streamlined WM_NOTIFY processing code fixing a bug with toolbar tooltips in presence... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2b15b970e084b5b8de23d7f44734e6cc714d2a66 streamlined WM_NOTIFY processing code fixing a bug with toolbar tooltips in presence of the control in toolbar git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index cc725c6280..004d5d78bd 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3021,7 +3021,7 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass, // --------------------------------------------------------------------------- #ifdef __WIN95__ -// FIXME: VZ: I'm not sure at all that the order of processing is correct + bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { #ifndef __WXMICROWIN__ @@ -3029,12 +3029,19 @@ bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) HWND hWnd = hdr->hwndFrom; wxWindow *win = wxFindWinFromHandle((WXHWND)hWnd); - // is this one of our windows? + // if the control is one of our windows, let it handle the message itself if ( win ) { return win->MSWOnNotify(idCtrl, lParam, result); } + // VZ: why did we do it? normally this is unnecessary and, besides, it + // breaks the message processing for the toolbars because the tooltip + // notifications were being forwarded to the toolbar child controls + // (if it had any) before being passed to the toolbar itself, so in my + // example the tooltip for the combobox was always shown instead of the + // correct button tooltips +#if 0 // try all our children wxWindowList::Node *node = GetChildren().GetFirst(); while ( node ) @@ -3047,8 +3054,9 @@ bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) node = node->GetNext(); } +#endif // 0 - // finally try this window too (catches toolbar case) + // by default, handle it ourselves return MSWOnNotify(idCtrl, lParam, result); #else // __WXMICROWIN__ return FALSE; @@ -3131,6 +3139,7 @@ bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl), return FALSE; } + #endif // __WIN95__ // ---------------------------------------------------------------------------