X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a5a5718592cb0873374e6ebc66d12a153d5acea..118322a3dfcc1803bd13df8193ea1be9ae39e653:/src/msw/radiobox.cpp diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index c42ccbd12c..524027ecf9 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -294,7 +294,7 @@ bool wxRadioBox::Create(wxWindow *parent, m_radioHeight = new int[n]; WXHFONT hfont = 0; - wxFont& font = GetFont(); + wxFont font = GetFont(); if ( font.Ok() ) { hfont = font.GetResourceHandle(); @@ -345,6 +345,11 @@ bool wxRadioBox::Create(wxWindow *parent, 0, 0, 0, 0, hwndParent, (HMENU)NewControlId(), wxGetInstance(), NULL); +#ifdef __WXWINCE__ + // Set the z-order correctly + SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); +#endif + SetSelection(0); SetSize(pos.x, pos.y, size.x, size.y); @@ -466,7 +471,7 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const { // the radiobox should be big enough for its buttons int cx1, cy1; - wxGetCharSize(m_hWnd, &cx1, &cy1, &GetFont()); + wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont()); int extraHeight = cy1; @@ -525,7 +530,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) #endif int cx1, cy1; - wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont()); + wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont()); // Attempt to have a look coherent with other platforms: We compute the // biggest toggle dim, then we align all items according this value. @@ -893,9 +898,6 @@ WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSE HDC hdc = (HDC)pDC; wxColour colBack = GetBackgroundColour(); - if (!IsEnabled()) - colBack = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); - ::SetBkColor(hdc, wxColourToRGB(colBack)); ::SetTextColor(hdc, wxColourToRGB(GetForegroundColour())); @@ -1038,7 +1040,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") ); - bool processed = TRUE; + bool processed wxDUMMY_INITIALIZE(true); // HELPINFO doesn't seem to be supported on WinCE. #ifndef __WXWINCE__ @@ -1074,7 +1076,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, processed = radiobox->GetEventHandler()->ProcessEvent(helpEvent); } else - processed = FALSE; + processed = false; #endif if (processed) return 0;