+ if (!pItem)
+ pItem = (WXMEASUREITEMSTRUCT*)new OWNERITEM;
+
+ POWNERITEM pMeasureStruct = (POWNERITEM)pItem;
+ wxScreenDC vDc;
+
+ //
+ // Only owner-drawn control should receive this message
+ //
+ wxCHECK( ((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE );
+
+ vDc.SetFont(GetFont());
+
+ wxCoord vHeight;
+ wxCoord vWidth;
+
+ GetSize( &vWidth
+ ,NULL
+ );
+
+ pMeasureStruct->rclItem.xRight = (USHORT)vWidth;
+ pMeasureStruct->rclItem.xLeft = 0;
+ pMeasureStruct->rclItem.yTop = 0;
+ pMeasureStruct->rclItem.yBottom = 0;
+
+ vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
+ pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
+
+ return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
+} // end of wxListBox::OS2OnMeasure
+
+bool wxListBox::OS2OnDraw (
+ WXDRAWITEMSTRUCT* pItem
+)
+{
+ POWNERITEM pDrawStruct = (POWNERITEM)pItem;
+ LONG lItemID = pDrawStruct->idItem;
+ int eAction = 0;
+ int eStatus = 0;
+
+ //
+ // Only owner-drawn control should receive this message
+ //
+ wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), false);
+
+
+ //
+ // The item may be -1 for an empty listbox
+ //
+ if (lItemID == -1L)
+ return false;
+
+ wxListBoxItem* pData = (wxListBoxItem*)PVOIDFROMMR( ::WinSendMsg( GetHwnd()
+ ,LM_QUERYITEMHANDLE
+ ,MPFROMLONG(pDrawStruct->idItem)
+ ,(MPARAM)0
+ )
+ );
+
+ wxCHECK(pData, false );
+
+ wxDC vDc;
+ wxPoint pt1( pDrawStruct->rclItem.xLeft, pDrawStruct->rclItem.yTop );
+ wxPoint pt2( pDrawStruct->rclItem.xRight, pDrawStruct->rclItem.yBottom );
+ wxRect vRect( pt1, pt2 );
+
+ vDc.SetHPS(pDrawStruct->hps);
+
+ if (pDrawStruct->fsAttribute == pDrawStruct->fsAttributeOld)