- m_backgroundColour = parent->GetBackgroundColour();
- m_foregroundColour = parent->GetForegroundColour();
-
- long msStyle = BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP | WS_CHILD | WS_VISIBLE;
-#ifdef __WIN32__
- if(m_windowStyle & wxBU_LEFT)
- msStyle |= BS_LEFT;
- if(m_windowStyle & wxBU_RIGHT)
- msStyle |= BS_RIGHT;
- if(m_windowStyle & wxBU_TOP)
- msStyle |= BS_TOP;
- if(m_windowStyle & wxBU_BOTTOM)
- msStyle |= BS_BOTTOM;
-#endif
-
- m_hWnd = (WXHWND)CreateWindowEx(MakeExtendedStyle(m_windowStyle),
- wxT("BUTTON"), label,
- msStyle, 0, 0, 0, 0,
- (HWND)parent->GetHWND(),
- (HMENU)m_windowId,
- wxGetInstance(), NULL);
-
- if ( m_hWnd == 0 )
- {
- wxLogError(_T("Failed to create a toggle button"));