- if (!CreateBase(parent, id, pos, size, style, validator, name))
- return FALSE;
-
- parent->AddChild(this);
-
- 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
+ if ( !CreateControl(parent, id, pos, size, style, validator, name) )
+ return false;