X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1de4baa31f17548b32a376a71ce50fee6a3e759c..42ba812b705cec0ebef0fb65bb72d27a1378b316:/src/os2/checklst.cpp diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index f3a639ff6a..5f6282c54e 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -112,6 +112,9 @@ bool wxCheckListBoxItem::OnDrawItem ( { wxRect vRect = rRect; + ::WinQueryWindowRect( m_pParent->GetHWND() + ,&rDc.m_vRclPaint + ); if (IsChecked()) eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked); @@ -141,9 +144,6 @@ bool wxCheckListBoxItem::OnDrawItem ( m_pParent->GetSize( NULL ,&nParentHeight ); - ::WinQueryWindowRect( m_pParent->GetHWND() - ,&rDc.m_vRclPaint - ); nY = nParentHeight - nY - nCheckHeight; vPenBack = wxPen(vColour, 1, wxSOLID); @@ -372,7 +372,7 @@ wxOwnerDrawn* wxCheckListBox::CreateItem ( // Return item size // ---------------- // -bool wxCheckListBox::OS2OnMeasure ( +long wxCheckListBox::OS2OnMeasure ( WXMEASUREITEMSTRUCT* pItem ) { @@ -391,9 +391,9 @@ bool wxCheckListBox::OS2OnMeasure ( // Add place for the check mark // pStruct->rclItem.xRight += wxOwnerDrawn::GetDefaultMarginWidth(); - return TRUE; + return long(MRFROM2SHORT((USHORT)m_nItemHeight, (USHORT)(pStruct->rclItem.xRight - pStruct->rclItem.xLeft))); } - return FALSE; + return 0L; } // end of wxCheckListBox::CreateItem //