X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/345264343a2fa3ee7362a4afb91b669216ee51fe..1afe8c83072c52d957db8a9877ca28011258ecac:/src/msw/radiobox.cpp?ds=sidebyside diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index e9f53d0f46..cdf5141085 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -150,6 +150,11 @@ bool wxRadioBox::Create(wxWindow *parent, if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) ) return false; + // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS + // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case + if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) ) + style |= wxRA_SPECIFY_COLS; + #if wxUSE_VALIDATORS SetValidator(val); #else @@ -183,7 +188,7 @@ bool wxRadioBox::Create(wxWindow *parent, styleBtn, 0, 0, 0, 0, // will be set in SetSize() GetHwndOf(parent), - (HMENU)subid.GetValue(), + (HMENU)wxUIntToPtr(subid.GetValue()), wxGetInstance(), NULL); @@ -210,7 +215,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxEmptyString, WS_GROUP | BS_AUTORADIOBUTTON | WS_CHILD, 0, 0, 0, 0, GetHwndOf(parent), - (HMENU)m_dummyId.GetValue(), wxGetInstance(), NULL); + (HMENU)wxUIntToPtr(m_dummyId.GetValue()), + wxGetInstance(), NULL); m_radioButtons->SetFont(GetFont()); @@ -248,7 +254,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxRadioBox::~wxRadioBox() { - m_isBeingDeleted = true; + SendDestroyEvent(); delete m_radioButtons; if ( m_dummyHwnd )