long style,
const wxString& name)
{
+ m_hWnd = 0;
+
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
GetGValue(GetSysColor(COLOR_BTNFACE)),
GetBValue(GetSysColor(COLOR_BTNFACE)));
replaceBitmap.nIDNew = (UINT) (HBITMAP) m_hBitmap;
replaceBitmap.nButtons = noButtons;
if (::SendMessage((HWND) GetHWND(), TB_REPLACEBITMAP, (WPARAM) 0, (LPARAM) &replaceBitmap) == -1)
+ {
wxFAIL_MSG(_T("Could not add bitmap to toolbar"));
+ }
::DeleteObject((HBITMAP) oldToolBarBitmap);
addBitmap.hInst = 0;
addBitmap.nID = (UINT)m_hBitmap;
if (::SendMessage((HWND) GetHWND(), TB_ADDBITMAP, (WPARAM) noButtons, (LPARAM) &addBitmap) == -1)
+ {
wxFAIL_MSG(_T("Could not add bitmap to toolbar"));
+ }
}
// Now add the buttons.