From be9d9869430d4f652702526828abd644acec5f01 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Tue, 3 Jan 2006 11:49:09 +0000 Subject: [PATCH] Applied patch #1395526 (Autoradiobutton corrections) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/radiobox.cpp | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/src/os2/radiobox.cpp b/src/os2/radiobox.cpp index 019dae4ab0..0893aa63b4 100644 --- a/src/os2/radiobox.cpp +++ b/src/os2/radiobox.cpp @@ -197,7 +197,7 @@ void wxRadioBox::AdjustButtons( int nX, // radiobox part not belonging to any radiobutton) // ::WinSetWindowPos( (HWND)m_ahRadioButtons[i] - ,HWND_TOP + ,HWND_BOTTOM ,(LONG)nXOffset ,(LONG)nYOffset ,(LONG)nWidthBtn @@ -334,7 +334,7 @@ bool wxRadioBox::Create( long lStyleBtn = BS_AUTORADIOBUTTON | WS_TABSTOP | WS_VISIBLE; int nNewId = NewControlId(); - if (i == 0 && lStyle == 0) + if (i == 0) lStyleBtn |= WS_GROUP; HWND hWndBtn = (WXHWND)::WinCreateWindow ( GetHwndOf(pParent) @@ -343,7 +343,7 @@ bool wxRadioBox::Create( ,lStyleBtn ,0, 0, 0, 0 ,GetWinHwnd(pParent) - ,HWND_TOP + ,HWND_BOTTOM ,(HMENU)nNewId ,NULL ,NULL @@ -376,12 +376,12 @@ bool wxRadioBox::Create( } // - // Create a dummy radio control to end the group. + // Create a dummy control to end the group. // (void)::WinCreateWindow ( GetHwndOf(pParent), WC_BUTTON, "", - WS_GROUP | BS_AUTORADIOBUTTON, + WS_GROUP, 0, 0, 0, 0, GetWinHwnd(pParent), HWND_TOP, @@ -400,23 +400,13 @@ bool wxRadioBox::Create( ,sizeof(LONG) ,(PVOID)&lColor ); - ::WinSetPresParam( m_hWnd - ,PP_BORDERDARKCOLOR - ,sizeof(LONG) - ,(PVOID)&lColor - ); - lColor = (LONG)m_backgroundColour.GetPixel(); + lColor = (LONG)m_backgroundColour.GetPixel(); ::WinSetPresParam( m_hWnd ,PP_BACKGROUNDCOLOR ,sizeof(LONG) ,(PVOID)&lColor ); - ::WinSetPresParam( m_hWnd - ,PP_BORDERLIGHTCOLOR - ,sizeof(LONG) - ,(PVOID)&lColor - ); SetXComp(0); SetYComp(0); SetSelection(0); @@ -447,13 +437,8 @@ void wxRadioBox::DoSetSize( int nHeightOld; int nXx = nX; int nYy = nY; -#if RADIOBTN_PARENT_IS_RADIOBOX - int nXOffset = 0; - int nYOffset = 0; -#else int nXOffset = nXx; int nYOffset = nYy; -#endif int nCx1; int nCy1; wxSize vMaxSize = GetMaxButtonSize(); @@ -639,7 +624,7 @@ void wxRadioBox::DoSetSize( // radiobox part not belonging to any radiobutton) // ::WinSetWindowPos( (HWND)m_ahRadioButtons[i] - ,HWND_TOP + ,HWND_BOTTOM ,(LONG)nXOffset ,(LONG)nYOffset ,(LONG)nWidthBtn @@ -740,7 +725,7 @@ wxSize wxRadioBox::GetMaxButtonSize() const } // end of wxRadioBox::GetMaxButtonSize void wxRadioBox::GetPosition( int* pnX, - int* pnY ) const + int* WXUNUSED(pnY) ) const { wxWindowOS2* pParent = GetParent(); RECT vRect = { -1, -1, -1, -1 }; @@ -783,9 +768,7 @@ void wxRadioBox::GetPosition( int* pnX, vPoint.y = vPt.y; } if (pnX) - *pnX = vPoint.x; - if (pnY) - *pnY = vPoint.y; + *pnX = vPoint.y; } // end of wxRadioBox::GetPosition // Get single selection, for single choice list items @@ -1096,11 +1079,11 @@ MRESULT wxRadioBtnWndProc( switch(uVk) { case VK_LEFT: - eDir = wxDOWN; + eDir = wxLEFT; break; case VK_RIGHT: - eDir = wxDOWN; + eDir = wxRIGHT; break; case VK_DOWN: -- 2.45.2