- m_windowId = id;
-
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
-
- m_windowStyle = style ;
-
-// TODO create radiobutton
-/*
- long groupStyle = 0;
- if (m_windowStyle & wxRB_GROUP)
- groupStyle = WS_GROUP;
-
-// long msStyle = groupStyle | RADIO_FLAGS;
- long msStyle = groupStyle | BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE ;
-
- bool want3D;
- WXDWORD exStyle = Determine3DEffects(0, &want3D) ;
-
- m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const wxChar *)label,
- msStyle,0,0,0,0,
- (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL);
-
- wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create radiobutton") );
-
-
- 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)
+ m_windowId = vId;
+
+
+ m_windowStyle = lStyle ;
+
+ if (m_windowStyle & wxRB_GROUP)
+ lGroupStyle = WS_GROUP;
+
+ lsStyle = lGroupStyle | BS_AUTORADIOBUTTON | WS_VISIBLE ;
+
+ if (m_windowStyle & wxCLIP_SIBLINGS )
+ lsStyle |= WS_CLIPSIBLINGS;
+ //
+ // If the parent is a scrolled window the controls must
+ // have this style or they will overlap the scrollbars
+ //
+ if (pParent)
+ if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) ||
+ pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)))
+ lsStyle |= WS_CLIPSIBLINGS;
+
+ m_hWnd = (WXHWND)::WinCreateWindow ( GetHwndOf(pParent)
+ ,WC_BUTTON
+ ,rsLabel.c_str()
+ ,lsStyle
+ ,0, 0, 0, 0
+ ,GetWinHwnd(pParent)
+ ,HWND_TOP
+ ,(HMENU)m_windowId
+ ,NULL
+ ,NULL
+ );
+ wxCHECK_MSG(m_hWnd, FALSE, wxT("Failed to create radiobutton"));
+
+ if (rsLabel != wxT(""))