- // all controls have these childs (wxWindows creates all controls visible
- // by default)
- style |= WS_CHILD | WS_VISIBLE;
+ return TRUE;
+}
+
+bool wxControl::MSWCreateControl(const wxChar *classname,
+ const wxString& label,
+ const wxPoint& pos,
+ const wxSize& size)
+{
+ WXDWORD exstyle;
+ WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), &exstyle);
+
+ return MSWCreateControl(classname, msStyle, pos, size, label, exstyle);
+}
+
+bool wxControl::MSWCreateControl(const wxChar *classname,
+ WXDWORD style,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxString& label,
+ WXDWORD exstyle)
+{
+ // if no extended style given, determine it ourselves
+ if ( exstyle == (WXDWORD)-1 )
+ {
+ exstyle = 0;
+ (void) MSWGetStyle(GetWindowStyle(), &exstyle);
+ }
+
+ // all controls should have this style
+ style |= WS_CHILD;
+
+ // create the control visible if it's currently shown for wxWindows
+ if ( m_isShown )
+ {
+ style |= WS_VISIBLE;
+ }
+
+ int x = pos.x == -1 ? 0 : pos.x,
+ y = pos.y == -1 ? 0 : pos.y,
+ w = size.x == -1 ? 0 : size.x,
+ h = size.y == -1 ? 0 : size.y;