- SetName(name);
- SetValidator(validator);
- m_noStrings = 0; // Starts off with none, incremented in Append
- m_windowStyle = style;
- m_buttonWidget = (WXWidget) 0;
- m_menuWidget = (WXWidget) 0;
- m_widgetList = (WXWidget*) 0;
- m_formWidget = (WXWidget) 0;
-
- if (parent) parent->AddChild(this);
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
- m_backgroundColour = parent->GetBackgroundColour();
- m_foregroundColour = parent->GetForegroundColour();
- m_font = parent->GetFont();
+ if ( !CreateControl(parent, id, pos, size, style, validator, name) )
+ return FALSE;