+    static int                      nCheckSize = 0;
+
+    if (!nCheckSize)
+    {
+        wxScreenDC                  vDc;
+
+        vDc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+
+        //
+        // The height of a standard button in the dialog units is 8,
+        // translate this to pixels (as one dialog unit is precisely equal to
+        // 8 character heights, it's just the char height)
+        //
+        nCheckSize = vDc.GetCharHeight();
+    }
+
+    int                             nWidthCheckbox;
+    int                             nHeightCheckbox;
+    wxString                        sStr = wxGetWindowText(GetHWND());
+
+    if (!sStr.IsEmpty())
+    {
+        GetTextExtent( sStr
+                      ,&nWidthCheckbox
+                      ,&nHeightCheckbox
+                     );
+        nWidthCheckbox += nCheckSize + GetCharWidth();
+
+        if (nHeightCheckbox < nCheckSize)
+            nHeightCheckbox = nCheckSize;
+    }
+    else
+    {
+        nWidthCheckbox  = nCheckSize;
+        nHeightCheckbox = nCheckSize;
+    }
+
+    return wxSize( nWidthCheckbox
+                  ,nHeightCheckbox
+                 );
+} // end of wxCheckBox::DoGetBestSize
+
+void wxCheckBox::SetValue(
+  bool                              bValue
+)
+{
+    ::WinSendMsg(GetHwnd(), BM_SETCHECK, (MPARAM)bValue, 0);
+} // end of wxCheckBox::SetValue
+
+#ifndef BST_CHECKED
+#define BST_CHECKED 0x0001
+#endif