X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d285d708a229ece6ad606a460bcbf048c65d252b..24f588af92d50c77142e299ff66ba45b88915c8c:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index aba22e63b4..36162cb9a9 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -430,7 +430,10 @@ bool wxWindowMSW::Create(wxWindow *parent, msflags |= WS_VISIBLE; } - return MSWCreate(wxCanvasClassName, NULL, pos, size, msflags, exstyle); + bool retVal = MSWCreate(wxCanvasClassName, NULL, pos, size, msflags, exstyle); + if (retVal) + SetWindowLong( (HWND)m_hWnd, GWL_WNDPROC, (LONG)wxWndProc); + return retVal; } // --------------------------------------------------------------------------- @@ -3075,7 +3078,7 @@ bool wxWindowMSW::HandleTooltipNotify(WXUINT code, // we need to handle it as well, otherwise no tooltips will be shown in // this case - if ( !(code == TTN_NEEDTEXTA || code == TTN_NEEDTEXTW) || ttip.empty() ) + if ( !(code == (WXUINT) TTN_NEEDTEXTA || code == (WXUINT) TTN_NEEDTEXTW) || ttip.empty() ) { // not a tooltip message or no tooltip to show anyhow return FALSE; @@ -3083,7 +3086,7 @@ bool wxWindowMSW::HandleTooltipNotify(WXUINT code, LPTOOLTIPTEXT ttText = (LPTOOLTIPTEXT)lParam; - if ( code == TTN_NEEDTEXTA ) + if ( code == (WXUINT) TTN_NEEDTEXTA ) { ttText->lpszText = (wxChar *)ttip.c_str(); }