X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c085e333984dc079a001cd3f581aeb1f51a1f227..b82827dd43caa489eade15cc02edef7fb79e8c20:/src/msw/radiobox.cpp diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index d4ea423c08..dd9e9421fa 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -23,6 +23,8 @@ #ifndef WX_PRECOMP #include #include "wx/setup.h" +#include "wx/bitmap.h" +#include "wx/brush.h" #include "wx/radiobox.h" #endif @@ -125,8 +127,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, WXDWORD exStyle = Determine3DEffects(0, &want3D) ; // Even with extended styles, need to combine with WS_BORDER // for them to look right. +/* if ( want3D || wxStyleHasBorder(m_windowStyle) ) msStyle |= WS_BORDER; +*/ HWND the_handle = (HWND) parent->GetHWND() ; @@ -152,7 +156,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, } #endif - SetFont(* parent->GetFont()); + SetFont(parent->GetFont()); SubclassWin((WXHWND)m_hWnd); @@ -181,10 +185,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, m_useCtl3D = TRUE; } #endif - if (GetFont()) + if (GetFont().Ok()) { SendMessage((HWND)m_radioButtons[i],WM_SETFONT, - (WPARAM)GetFont()->GetResourceHandle(),0L); + (WPARAM)GetFont().GetResourceHandle(),0L); } m_subControls.Append((wxObject *)newId); } @@ -260,7 +264,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, } #endif - SetFont(* parent->GetFont()); + SetFont(parent->GetFont()); // Subclass again for purposes of dialog editing mode SubclassWin((WXHWND)m_hWnd); @@ -405,7 +409,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) int current_width, cyf; 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. @@ -421,7 +425,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) { // It's a labelled toggle GetWindowText((HWND) m_radioButtons[i], buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, GetFont()); + GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont()); eachWidth = (int)(current_width + RADIO_SIZE); eachHeight = (int)((3*cyf)/2); } @@ -501,7 +505,7 @@ void wxRadioBox::SetSize(int x, int y, int width, int height, int sizeFlags) { // It's a labeled item GetWindowText((HWND) m_radioButtons[i], buf, 300); - GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont()); + GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont()); // How do we find out radio button bitmap size!! // By adjusting them carefully, manually :-) @@ -590,7 +594,7 @@ wxString wxRadioBox::GetLabel(void) const void wxRadioBox::SetLabel(const wxString& label) { - if (m_hWnd && label) + if (m_hWnd) SetWindowText((HWND) m_hWnd, label); }