- SetName(name);
- SetValidator(validator);
-
- if (parent) parent->AddChild(this);
- SetBackgroundColour(parent->GetBackgroundColour());
- SetForegroundColour(parent->GetForegroundColour());
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
- m_windowStyle = style ;
-
- long groupStyle = 0;
- if (m_windowStyle & wxRB_GROUP)
- groupStyle = WS_GROUP;
-
-// long msStyle = groupStyle | RADIO_FLAGS;
- long msStyle = groupStyle | BS_RADIOBUTTON | WS_CHILD | WS_VISIBLE ;
-
- m_hWnd = (WXHWND) CreateWindowEx(MakeExtendedStyle(m_windowStyle), RADIO_CLASS, "toggle",
- msStyle,0,0,0,0,
- (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL);
-
- wxCHECK_MSG( m_hWnd, "Failed to create radio button", FALSE );
-
-#if CTL3D
- if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
- {
- Ctl3dSubclassCtl((HWND) GetHWND());
- m_useCtl3D = TRUE;
- }
-#endif