X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/025f7d775c8366dec72258e0d9d83848203c4871..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 6e9d951f76..16ebe1ffc1 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -805,8 +805,8 @@ bool wxToolBar::Realize() TBREPLACEBITMAP replaceBitmap; replaceBitmap.hInstOld = NULL; replaceBitmap.hInstNew = NULL; - replaceBitmap.nIDOld = (UINT) oldToolBarBitmap; - replaceBitmap.nIDNew = (UINT) hBitmap; + replaceBitmap.nIDOld = (UINT_PTR)oldToolBarBitmap; + replaceBitmap.nIDNew = (UINT_PTR)hBitmap; replaceBitmap.nButtons = nButtons; if ( !::SendMessage(GetHwnd(), TB_REPLACEBITMAP, 0, (LPARAM) &replaceBitmap) ) @@ -835,7 +835,7 @@ bool wxToolBar::Realize() { TBADDBITMAP addBitmap; addBitmap.hInst = 0; - addBitmap.nID = (UINT) hBitmap; + addBitmap.nID = (UINT_PTR)hBitmap; if ( ::SendMessage(GetHwnd(), TB_ADDBITMAP, (WPARAM) nButtons, (LPARAM)&addBitmap) == -1 ) { @@ -915,7 +915,7 @@ bool wxToolBar::Realize() { const wxString& label = tool->GetLabel(); if ( !label.empty() ) - button.iString = (int)label.wx_str(); + button.iString = (INT_PTR)label.wx_str(); } button.idCommand = tool->GetId(); @@ -1593,7 +1593,10 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event) #endif // wxUSE_UXTHEME - if ( UseBgCol() || (GetMSWToolbarStyle() & TBSTYLE_TRANSPARENT) ) + // we need to always draw our background under XP, as otherwise it doesn't + // appear correctly with some themes (e.g. Zune one) + if ( majorVersion == 5 || + UseBgCol() || (GetMSWToolbarStyle() & TBSTYLE_TRANSPARENT) ) { // do draw our background //