]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/checklst.cpp
Unicode compilation fixes after wxFFile change
[wxWidgets.git] / src / os2 / checklst.cpp
index f3a639ff6a8aeda38d4b85a47def8d1d2dd9de0e..ec5776444d2965b20cd9c670ab8a2c6cf2866492 100644 (file)
@@ -27,6 +27,7 @@
 #include "wx/ownerdrw.h"
 #include "wx/settings.h"
 #include "wx/dcmemory.h"
+#include "wx/dcscreen.h"
 #include "wx/os2/checklst.h"
 #include "wx/log.h"
 
@@ -112,6 +113,9 @@ bool wxCheckListBoxItem::OnDrawItem (
 {
     wxRect                          vRect = rRect;
 
+    ::WinQueryWindowRect( m_pParent->GetHWND()
+                         ,&rDc.m_vRclPaint
+                        );
     if (IsChecked())
         eStat = (wxOwnerDrawn::wxODStatus)(eStat | wxOwnerDrawn::wxODChecked);
 
@@ -141,9 +145,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);
@@ -273,9 +274,7 @@ wxCheckListBox::wxCheckListBox (
 , int                               nStrings
 , const wxString                    asChoices[]
 , long                              lStyle
-#if wxUSE_VALIDATORS
 , const wxValidator&                rVal
-#endif
 , const wxString&                   rsName
 )
               : wxListBox()
@@ -287,9 +286,7 @@ wxCheckListBox::wxCheckListBox (
            ,nStrings
            ,asChoices
            ,lStyle | wxLB_OWNERDRAW
-#if wxUSE_VALIDATORS
            ,rVal
-#endif
            ,rsName
           );
 } // end of wxCheckListBox::wxCheckListBox
@@ -372,7 +369,7 @@ wxOwnerDrawn* wxCheckListBox::CreateItem (
 // Return item size
 // ----------------
 //
-bool wxCheckListBox::OS2OnMeasure (
+long wxCheckListBox::OS2OnMeasure (
   WXMEASUREITEMSTRUCT*             pItem
 )
 {
@@ -391,9 +388,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
 
 //