- SetName(name);
- SetValidator(validator);
- if (parent) parent->AddChild(this);
-
- SetBackgroundColour(parent->GetBackgroundColour()) ;
- SetForegroundColour(parent->GetForegroundColour()) ;
-
- m_windowStyle = style;
-
- wxString Label = label;
- if (Label == wxT(""))
- Label = wxT(" "); // Apparently needed or checkbox won't show
-
- if ( id == -1 )
- m_windowId = NewControlId();
- else
- m_windowId = id;
-
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
-
- // TODO: create checkbox
-
- // Subclass again for purposes of dialog editing mode
- SubclassWin(m_hWnd);
-
- SetFont(parent->GetFont());
-
- SetSize(x, y, width, height);
-
- return FALSE;
-}
-
-void wxCheckBox::SetLabel(const wxString& label)
+ if (!CreateControl( pParent
+ ,vId
+ ,rPos
+ ,rSize
+ ,lStyle
+ ,rValidator
+ ,rsName
+ ))
+ return false;
+
+
+ long osStyle = BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE;
+
+ bool bOk = OS2CreateControl( wxT("BUTTON")
+ ,osStyle
+ ,rPos
+ ,rSize
+ ,rsLabel
+ ,0
+ );
+ m_backgroundColour = pParent->GetBackgroundColour();
+
+ LONG lColor = (LONG)m_backgroundColour.GetPixel();
+ ::WinSetPresParam( m_hWnd
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
+ wxAssociateWinWithHandle(m_hWnd, this);
+ return bOk;
+} // end of wxCheckBox::Create
+
+void wxCheckBox::SetLabel( const wxString& rsLabel )