- wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create radiobutton") );
-
-#if wxUSE_CTL3D
- if (want3D)
- {
- Ctl3dSubclassCtl((HWND) m_hWnd);
- m_useCtl3D = TRUE;
- }
-#endif
-
- SetFont(parent->GetFont());
-
- // Subclass again for purposes of dialog editing mode
- SubclassWin((WXHWND)m_hWnd);
-
-// SetValue(value);
-
- // start GRW fix
- if (label != wxT(""))
- {
- int label_width, label_height;
- GetTextExtent(label, &label_width, &label_height, NULL, NULL, & this->GetFont());
- if (width < 0)
- width = (int)(label_width + RADIO_SIZE);
- if (height<0)
- {
- height = (int)(label_height);
- if (height < RADIO_SIZE)
- height = RADIO_SIZE;
- }
- }
- else
- {
- if (width < 0)
- width = RADIO_SIZE;
- if (height < 0)
- height = RADIO_SIZE;
- }
- // end GRW fix
-
- SetSize(x, y, width, height);
-
- // for compatibility with wxGTK, the first radio button in a group is
- // always checked (this makes sense anyhow as you need to ensure that at
- // least one button in the group is checked and this is the simlpest way to
- // do it)
- if ( m_windowStyle & wxRB_GROUP )
- SetValue(TRUE);
-
- return TRUE;