choices[i],
styleBtn,
0, 0, 0, 0, // will be set in SetSize()
- GetHwnd(),
+ GetHwndOf(parent),
(HMENU)newId,
wxGetInstance(),
NULL);
(void)::CreateWindow(_T("BUTTON"),
wxEmptyString,
WS_GROUP | BS_AUTORADIOBUTTON | WS_CHILD,
- 0, 0, 0, 0, GetHwnd(),
+ 0, 0, 0, 0, GetHwndOf(parent),
(HMENU)NewControlId(), wxGetInstance(), NULL);
m_radioButtons->SetFont(GetFont());
bool wxRadioBox::IsItemEnabled(int item) const
{
wxCHECK_MSG( IsValid(item), false,
- wxT("invalid item in wxRadioBox::Enable()") );
+ wxT("invalid item in wxRadioBox::IsItemEnabled()") );
return ::IsWindowEnabled((*m_radioButtons)[item]) != 0;
}
bool wxRadioBox::IsItemShown(int item) const
{
wxCHECK_MSG( IsValid(item), false,
- wxT("invalid item in wxRadioBox::Enable()") );
+ wxT("invalid item in wxRadioBox::IsItemShown()") );
// don't use IsWindowVisible() here because it would return false if the
// radiobox itself is hidden while we want to only return false if this
if (y == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
yy = currentY;
- int y_offset = 0;
- int x_offset = 0;
+ int y_offset = yy;
+ int x_offset = xx;
int cx1, cy1;
wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
// the radiobox entirely and the radiobox tooltips are always shown
// (otherwise they are not when the mouse pointer is in the radiobox
// part not belonging to any radiobutton)
- ::MoveWindow((*m_radioButtons)[i],
- x_offset, y_offset, widthBtn, maxHeight,
- TRUE);
+ DoMoveSibling((*m_radioButtons)[i], x_offset, y_offset, widthBtn, maxHeight);
// where do we put the next button?
if ( m_windowStyle & wxRA_SPECIFY_ROWS )
return (WXHRGN)hrgn;
}
-WXLRESULT
-wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
-{
- // FIXME: Without this, the radiobox corrupts other controls as it moves
- // in a dynamic layout. Refreshing causes flicker, but it's better than
- // leaving droppings. Note that for some reason, wxStaticBox doesn't need
- // this (perhaps because it has no real children?)
- if ( nMsg == WM_MOVE )
- {
- WXLRESULT res = wxControl::MSWWindowProc(nMsg, wParam, lParam);
- wxRect rect = GetRect();
- GetParent()->Refresh(true, & rect);
- return res;
- }
-
- return wxStaticBox::MSWWindowProc(nMsg, wParam, lParam);
-}
-
#endif // __WXWINCE__
// ---------------------------------------------------------------------------