]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobox.cpp
don't send text changed events from ctor as wxGTK doesn't do it and people apparently...
[wxWidgets.git] / src / msw / radiobox.cpp
index 4fc2d2acbd9e373c572a30683c6eb208bffa20f3..9108095f9347df49a4308c796e3774f6e5d40b58 100644 (file)
@@ -183,7 +183,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 +210,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());
@@ -461,6 +462,25 @@ void wxRadioBox::DoSetItemToolTip(unsigned int item, wxToolTip *tooltip)
 
 #endif // wxUSE_TOOLTIPS
 
+bool wxRadioBox::Reparent(wxWindowBase *newParent)
+{
+    if ( !wxStaticBox::Reparent(newParent) )
+    {
+        return false;
+    }
+
+    HWND hwndParent = GetHwndOf(GetParent());
+    for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ )
+    {
+        ::SetParent((*m_radioButtons)[item], hwndParent);
+    }
+#ifdef __WXWINCE__
+    // put static box under the buttons in the Z-order
+    SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+#endif
+    return true;
+}
+
 WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(wxRadioBox, wxStaticBox, m_radioButtons)
 
 // ----------------------------------------------------------------------------