- // If we delete an item, we should initialize the parent panel,
- // because it could now be invalid.
- wxWindow *parent = (wxWindow *)GetParent();
- if (parent)
+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 )