+bool wxControl::MSWCreateControl(const wxChar *classname, WXDWORD style)
+{
+ m_hWnd = (WXHWND)::CreateWindowEx
+ (
+ GetExStyle(style), // extended style
+ classname, // the kind of control to create
+ NULL, // the window name
+ style, // the window style
+ 0, 0, 0, 0, // the window position and size
+ GetHwndOf(GetParent()), // parent
+ (HMENU)GetId(), // child id
+ wxGetInstance(), // app instance
+ NULL // creation parameters
+ );
+
+ if ( !m_hWnd )
+ {
+#ifdef __WXDEBUG__
+ wxLogError(wxT("Failed to create a control of class '%s'"), classname);
+#endif // DEBUG
+
+ return FALSE;
+ }
+
+ // subclass again for purposes of dialog editing mode
+ SubclassWin(m_hWnd);
+
+ // controls use the same font and colours as their parent dialog by default
+ InheritAttributes();
+
+ return TRUE;
+}
+
+wxSize wxControl::DoGetBestSize()
+{
+ return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
+}
+