X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cd2df130f8162dc2cf9794c1507cd4bddce53910..3bcf00abd7aa6b515e776e18b3e295467a693959:/src/msw/radiobut.cpp?ds=sidebyside diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index ee28cf78d7..8f7c9786be 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -24,6 +24,7 @@ #include #include "wx/setup.h" #include "wx/radiobut.h" +#include "wx/brush.h" #endif #include "wx/msw/private.h" @@ -89,13 +90,13 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, msStyle |= WS_BORDER; */ - m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const char *)label, + m_hWnd = (WXHWND) CreateWindowEx(exStyle, RADIO_CLASS, (const wxChar *)label, msStyle,0,0,0,0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL); - wxCHECK_MSG( m_hWnd, FALSE, "Failed to create radiobutton" ); + wxCHECK_MSG( m_hWnd, FALSE, _T("Failed to create radiobutton") ); -#if CTL3D +#if wxUSE_CTL3D if (want3D) { Ctl3dSubclassCtl((HWND) m_hWnd); @@ -111,10 +112,10 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, // SetValue(value); // start GRW fix - if (label != "") + if (label != _T("")) { int label_width, label_height; - GetTextExtent(label, &label_width, &label_height, NULL, NULL, & GetFont()); + GetTextExtent(label, &label_width, &label_height, NULL, NULL, & this->GetFont()); if (width < 0) width = (int)(label_width + RADIO_SIZE); if (height<0) @@ -141,7 +142,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, void wxRadioButton::SetLabel(const wxString& label) { - SetWindowText((HWND) GetHWND(), (const char *)label); + SetWindowText((HWND) GetHWND(), (const wxChar *)label); } void wxRadioButton::SetValue(bool value) @@ -159,7 +160,7 @@ bool wxRadioButton::GetValue(void) const WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXUINT message, WXWPARAM wParam, WXLPARAM lParam) { -#if CTL3D +#if wxUSE_CTL3D if ( m_useCtl3D ) { HBRUSH hbrush = Ctl3dCtlColorEx(message, wParam, lParam); @@ -230,7 +231,7 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id, wxCHECK_MSG( m_hWnd, "Failed to create radio button", FALSE ); -#if CTL3D +#if wxUSE_CTL3D if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS)) { Ctl3dSubclassCtl((HWND) GetHWND());