- 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 ;
-
- bool want3D;
- WXDWORD exStyle = Determine3DEffects(0, &want3D) ;
-
- // Even with extended styles, need to combine with WS_BORDER
- // for them to look right.
- if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) ||
- (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER)))
- msStyle |= WS_BORDER;
-
- m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const char *)label,
- msStyle,0,0,0,0,
- (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL);
-#if CTL3D
- if (want3D)
- {
- Ctl3dSubclassCtl((HWND) m_hWnd);
- m_useCtl3D = TRUE;
- }
-#endif