X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bc0f25ed7eefb4a6fbeb61189a4c12023b9730f..1239ac2e28ff365856aa19e7e775962d6ba4fc93:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index ede0741c54..bb0520b14b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1021,14 +1021,14 @@ void wxWindowMSW::UnsubclassWin() } } -void wxWindowMSW::AssociateHandle(WXWidget handle) +void wxWindowMSW::AssociateHandle(WXWidget handle) { if ( m_hWnd ) { if ( !::DestroyWindow(GetHwnd()) ) wxLogLastError(wxT("DestroyWindow")); } - + WXHWND wxhwnd = (WXHWND)handle; SetHWND(wxhwnd); @@ -1036,9 +1036,9 @@ void wxWindowMSW::AssociateHandle(WXWidget handle) } void wxWindowMSW::DissociateHandle() -{ +{ // this also calls SetHWND(0) for us - UnsubclassWin(); + UnsubclassWin(); } @@ -3383,6 +3383,8 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate) #ifndef __WXWINCE__ if ( ((CREATESTRUCT *)cs)->dwExStyle & WS_EX_CONTROLPARENT ) EnsureParentHasControlParentStyle(GetParent()); +#else + wxUnusedVar(cs); #endif // !__WXWINCE__ // TODO: should generate this event from WM_NCCREATE @@ -3723,9 +3725,7 @@ wxWindowMSW::MSWOnDrawItem(int WXUNUSED_UNLESS_ODRAWN(id), } bool -wxWindowMSW::MSWOnMeasureItem(int WXUNUSED_UNLESS_ODRAWN(id), - WXMEASUREITEMSTRUCT * - WXUNUSED_UNLESS_ODRAWN(itemStruct)) +wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct) { #if wxUSE_OWNER_DRAWN && wxUSE_MENUS_NATIVE // is it a menu item? @@ -3750,7 +3750,10 @@ wxWindowMSW::MSWOnMeasureItem(int WXUNUSED_UNLESS_ODRAWN(id), { return item->MSWOnMeasure(itemStruct); } -#endif // wxUSE_OWNER_DRAWN +#else + wxUnusedVar(id); + wxUnusedVar(itemStruct); +#endif // wxUSE_OWNER_DRAWN && wxUSE_MENUS_NATIVE return false; } @@ -4183,7 +4186,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam) break; case SIZE_MAXIMIZED: - processed = HandleMaximize(); + /* processed = */ HandleMaximize(); // fall through to send a normal size event as well case SIZE_RESTORED: @@ -4720,7 +4723,7 @@ int wxWindowMSW::HandleMenuChar(int chAccel, WXLPARAM lParam) // FIXME-UNICODE: this comparison doesn't risk to work // for non ASCII accelerator characters I'm afraid, but // what can we do? - if ( wxToupper(*p) == chAccel ) + if ( wxToupper(*p) == (wchar_t)chAccel ) { return i; } @@ -5135,7 +5138,7 @@ int wxCharCodeWXToMSW(int id, bool *isVirtual) return keySym; } -bool wxGetKeyState(wxKeyCode key) +bool wxGetKeyState(const wxKeyCode& key) { bool bVirtual; int vkey = wxCharCodeWXToMSW(key, &bVirtual);