X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfa536091649144c61c9a59b8a088295d5d7d11e..3413ceade83fb3026228e192d5737389aef3ad89:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 172db4547d..de0cc3ffaa 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -39,7 +39,7 @@ #include "wx/control.h" #endif -#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI)) +#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))) #include "wx/toolbar.h" #include "wx/sysopt.h" @@ -55,7 +55,7 @@ // conditional compilation // ---------------------------------------------------------------------------- -// wxWindows previously always considered that toolbar buttons have light grey +// wxWidgets previously always considered that toolbar buttons have light grey // (0xc0c0c0) background and so ignored any bitmap masks - however, this // doesn't work with XPMs which then appear to have black background. To make // this work, we must respect the bitmap masks - which we do now. This should @@ -240,6 +240,8 @@ bool wxToolBar::Create(wxWindow *parent, if ( !MSWCreateToolbar(pos, size) ) return FALSE; + wxSetCCUnicodeFormat(GetHwnd()); + // set up the colors and fonts SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR)); SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); @@ -386,6 +388,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) // Realize() later tool->Attach(this); + InvalidateBestSize(); return TRUE; } @@ -463,6 +466,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) } } + InvalidateBestSize(); return TRUE; } @@ -540,7 +544,7 @@ bool wxToolBar::Realize() MemoryHDC memoryDC2; #endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS - if (wxSystemOptions::GetOptionInt(wxT("no-remap")) == 1) + if (wxSystemOptions::HasOption(wxT("msw.remap")) && wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 0) { #if USE_BITMAP_MASKS dcAllButtons.SelectObject(wxNullBitmap); @@ -606,7 +610,7 @@ bool wxToolBar::Realize() bitmap.SetHBITMAP(0); #endif // USE_BITMAP_MASKS/!USE_BITMAP_MASKS - if (!wxSystemOptions::HasOption(wxT("no-remap")) || wxSystemOptions::GetOptionInt(wxT("no-remap")) == 0) + if (!wxSystemOptions::HasOption(wxT("msw.remap")) || wxSystemOptions::GetOptionInt(wxT("msw.remap")) == 1) { // Map to system colours hBitmap = (HBITMAP)MapBitmap((WXHBITMAP) hBitmap, @@ -920,6 +924,7 @@ bool wxToolBar::Realize() } } + InvalidateBestSize(); return TRUE; } @@ -1368,7 +1373,7 @@ void wxToolBar::HandleMouseMove(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam) } } -long wxToolBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +WXLRESULT wxToolBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { switch ( nMsg ) {