- SetName(name);
- SetValidator(validator);
- m_backgroundColour = parent->GetBackgroundColour();
- m_foregroundColour = parent->GetForegroundColour();
- m_font = parent->GetFont();
-
- if (parent) parent->AddChild(this);
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
- m_windowStyle = style ;
+ if( !CreateControl( parent, id, pos, size, style, validator, name ) )
+ return false;