X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f289196b3a47487984ed01ee108476bc227c4d5a..ceec2216bd3c65103e51a4ed9927f90fc1291d9c:/src/os2/radiobox.cpp diff --git a/src/os2/radiobox.cpp b/src/os2/radiobox.cpp index 01871f8e90..14ba806ec5 100644 --- a/src/os2/radiobox.cpp +++ b/src/os2/radiobox.cpp @@ -107,8 +107,6 @@ void wxRadioBox::AdjustButtons( int nStartY; int nMaxWidth; int nMaxHeight; - int nTotWidth; - int nTotHeight; wxGetCharSize( m_hWnd ,&nCx1 @@ -253,6 +251,25 @@ bool wxRadioBox::ContainsHWND( return FALSE; } // end of wxRadioBox::ContainsHWND +bool wxRadioBox::Create( + wxWindow* pParent +, wxWindowID vId +, const wxString& rsTitle +, const wxPoint& rPos +, const wxSize& rSize +, const wxArrayString& asChoices +, int nMajorDim +, long lStyle +, const wxValidator& rVal +, const wxString& rsName +) +{ + wxCArrayString chs(asChoices); + + return Create(pParent, vId, rsTitle, rPos, rSize, chs.GetCount(), + chs.GetStrings(), nMajorDim, lStyle, rVal, rsName); +} + bool wxRadioBox::Create( wxWindow* pParent , wxWindowID vId @@ -263,9 +280,7 @@ bool wxRadioBox::Create( , const wxString asChoices[] , int nMajorDim , long lStyle -#if wxUSE_VALIDATORS , const wxValidator& rVal -#endif , const wxString& rsName ) { @@ -288,9 +303,7 @@ bool wxRadioBox::Create( ,rPos ,rSize ,lStyle -#if wxUSE_VALIDATORS ,rVal -#endif ,rsName )) return FALSE; @@ -303,12 +316,6 @@ bool wxRadioBox::Create( return FALSE; wxAssociateWinWithHandle(m_hWnd, this); -#if RADIOBTN_PARENT_IS_RADIOBOX - HWND hWndParent = GetHwnd(); -#else - HWND hWndParent = GetHwndOf(pParent); -#endif - HFONT hFont; // // Some radio boxes test consecutive id. @@ -861,8 +868,10 @@ void wxRadioBox::GetSize( ,&vRect ); - *pnWidth = vRect.xRight - vRect.xLeft; - *pnHeight = vRect.yBottom - vRect.yTop; + if (pnWidth) + *pnWidth = vRect.xRight - vRect.xLeft; + if (pnHeight) + *pnHeight = vRect.yTop - vRect.yBottom; } // end of wxRadioBox::GetSize // Find string for position @@ -1026,8 +1035,6 @@ bool wxRadioBox::SetFont( // // Also set the font of our radio buttons // - WXHFONT hFont = wxFont(rFont).GetResourceHandle(); - for (int n = 0; n < (int)m_nNoItems; n++) { HWND hWndBtn = (HWND)m_ahRadioButtons[n]; @@ -1084,8 +1091,6 @@ bool wxRadioBox::Show( bool bShow ) { - int nCmdShow = 0; - if (!wxControl::Show(bShow)) return FALSE; @@ -1112,8 +1117,6 @@ void wxRadioBox::SubclassRadioButton( WXHWND hWndBtn ) { - HWND hwndBtn = (HWND)hWndBtn; - fnWndProcRadioBtn = (WXFARPROC)::WinSubclassWindow(hWndBtn, (PFNWP)wxRadioBtnWndProc); } // end of wxRadioBox::SubclassRadioButton