X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec5f0c24123fe801fb82b69771c171c0b9d064fc..3f93a7508ea292a0ba836eefcccf20a716eaf135:/src/msw/wince/tbarwce.cpp?ds=sidebyside diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index 33f429e306..5a410368c4 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "tbarwce.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -393,6 +389,7 @@ bool wxToolMenuBar::Realize() case wxTOOL_STYLE_CONTROL: button.idCommand = tool->GetId(); // fall through: create just a separator too + // TODO: controls are not yet supported on wxToolMenuBar. case wxTOOL_STYLE_SEPARATOR: button.fsState = TBSTATE_ENABLED; @@ -419,7 +416,8 @@ bool wxToolMenuBar::Realize() wxMemoryDC memDC; wxBitmap b(16,16); memDC.SelectObject(b); - memDC.SetBackground(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE))); + wxColour col = wxColour(192,192,192); + memDC.SetBackground(wxBrush(col)); memDC.Clear(); int x = (16 - bmp.GetWidth())/2; int y = (16 - bmp.GetHeight())/2; @@ -477,9 +475,10 @@ bool wxToolMenuBar::Realize() break; } - BOOL bRc = ::CommandBar_AddButtons( (HWND) GetHWND(), 1, buttons ); - - wxASSERT_MSG( bRc, wxT("Could not add toolbar button.")); + if ( !::CommandBar_AddButtons( (HWND) GetHWND(), 1, buttons ) ) + { + wxFAIL_MSG( wxT("Could not add toolbar button.")); + } lastWasRadio = isRadio; } @@ -527,6 +526,27 @@ bool wxToolMenuBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id) return true; } +WXLRESULT wxToolMenuBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + switch ( nMsg ) + { + case WM_SIZE: + break; + + case WM_MOUSEMOVE: + // we don't handle mouse moves, so always pass the message to + // wxControl::MSWWindowProc + HandleMouseMove(wParam, lParam); + break; + + case WM_PAINT: + break; + } + + return wxControl::MSWWindowProc(nMsg, wParam, lParam); +} + + #else ////////////// For Smartphone