X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a236aa2058ccf3d36e9cafc20fa7375080c4be50..e1f833da2a8bbe01cc96c0d7a3542ac2c1d6d6f0:/src/os2/checklst.cpp diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index c32fc84787..f0a3ac723b 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -33,6 +33,7 @@ #include "wx/font.h" #endif +#include "wx/os2/dc.h" #include "wx/ownerdrw.h" #define INCL_PM @@ -112,7 +113,9 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc, { wxRect vRect = rRect; - ::WinQueryWindowRect( m_pParent->GetHWND(), &rDc.m_vRclPaint ); + + wxPMDCImpl *impl = (wxPMDCImpl*) rDc.GetImpl(); + ::WinQueryWindowRect( m_pParent->GetHWND(), &impl->m_vRclPaint ); if (IsChecked()) eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked); @@ -167,8 +170,8 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc, // HBITMAP hChkBmp = ::WinGetSysBitmap( HWND_DESKTOP, SBMP_MENUCHECK ); POINTL vPoint = {nX, nOldY + 3}; - - ::WinDrawBitmap( rDc.GetHPS(), + wxPMDCImpl *impl = (wxPMDCImpl*) rDc.GetImpl(); + ::WinDrawBitmap( impl->GetHPS(), hChkBmp, NULL, &vPoint, @@ -284,29 +287,6 @@ void wxCheckListBox::Delete(unsigned int n) m_aItems.RemoveAt(n); } // end of wxCheckListBox::Delete -int wxCheckListBox::DoInsertItems(const wxArrayStringsAdapter& items, - unsigned int pos, - void **clientData, - wxClientDataType type) -{ - // pos is validated in wxListBox - int result = wxListBox::DoInsertItems( items, pos, clientData, type ); - unsigned int n = items.GetCount(); - for (unsigned int i = 0; i < n; i++) - { - wxOwnerDrawn* pNewItem = CreateItem((size_t)(pos + i)); - - pNewItem->SetName(items[i]); - m_aItems.Insert(pNewItem, (size_t)(pos + i)); - ::WinSendMsg( (HWND)GetHWND(), - LM_SETITEMHANDLE, - (MPARAM)(i + pos), - MPFROMP(pNewItem) - ); - } - return result; -} // end of wxCheckListBox::DoInsertItems - bool wxCheckListBox::SetFont ( const wxFont& rFont ) { for (unsigned int i = 0; i < m_aItems.GetCount(); i++)