#include <stdio.h>
#include "wx/setup.h"
#include "wx/radiobut.h"
+#include "wx/brush.h"
#endif
#include "wx/msw/private.h"
groupStyle = WS_GROUP;
// long msStyle = groupStyle | RADIO_FLAGS;
- long msStyle = groupStyle | BS_RADIOBUTTON | WS_CHILD | WS_VISIBLE ;
+ long msStyle = groupStyle | BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE ;
bool want3D;
WXDWORD exStyle = Determine3DEffects(0, &want3D) ;
wxCHECK_MSG( m_hWnd, FALSE, "Failed to create radiobutton" );
-#if CTL3D
+#if wxUSE_CTL3D
if (want3D)
{
Ctl3dSubclassCtl((HWND) m_hWnd);
if (label != "")
{
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)
SendMessage((HWND) GetHWND(), BM_SETCHECK, (WPARAM)value, 0L);
}
-// Get single selection, for single choice list items
+// Get single selection
bool wxRadioButton::GetValue(void) const
{
- return (SendMessage((HWND) GetHWND(), BM_SETCHECK, 0, 0L) != 0);
+ return (SendMessage((HWND) GetHWND(), BM_GETCHECK, 0, 0L) != 0);
}
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);
wxCHECK_MSG( m_hWnd, "Failed to create radio button", FALSE );
-#if CTL3D
+#if wxUSE_CTL3D
if (!(GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS))
{
Ctl3dSubclassCtl((HWND) GetHWND());