]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
make wxFrame a wxControlContainer too, so that it behaves in the same way as wxDialog
[wxWidgets.git] / src / msw / listctrl.cpp
index f5a5554c9e66d9e5dc39b4d6b54160adf26895b2..f61b3fd9ca4354fdd4f26bc183f56f13f893ce89 100644 (file)
@@ -205,7 +205,7 @@ public:
    {
        if (attr)
            delete attr;
    {
        if (attr)
            delete attr;
-   };
+   }
 
     DECLARE_NO_COPY_CLASS(wxListItemInternalData)
 };
 
     DECLARE_NO_COPY_CLASS(wxListItemInternalData)
 };
@@ -948,7 +948,7 @@ wxUIntPtr wxListCtrl::GetItemData(long item) const
 }
 
 // Sets the item data
 }
 
 // Sets the item data
-bool wxListCtrl::SetItemData(long item, long data)
+bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
 {
     wxListItem info;
 
 {
     wxListItem info;
 
@@ -2417,7 +2417,8 @@ static RECT GetCustomDrawnItemRect(const NMCUSTOMDRAW& nmcd)
     return rc;
 }
 
     return rc;
 }
 
-static bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont)
+static
+bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont, int colCount)
 {
     NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
 
 {
     NMCUSTOMDRAW& nmcd = pLVCD->nmcd;
 
@@ -2432,7 +2433,7 @@ static bool HandleSubItemPrepaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont)
     // get the rectangle to paint
     RECT rc;
     ListView_GetSubItemRect(hwndList, item, col, LVIR_BOUNDS, &rc);
     // get the rectangle to paint
     RECT rc;
     ListView_GetSubItemRect(hwndList, item, col, LVIR_BOUNDS, &rc);
-    if ( !col )
+    if ( !col && colCount > 1 )
     {
         // broken ListView_GetSubItemRect() returns the entire item rect for
         // 0th subitem while we really need just the part for this column
     {
         // broken ListView_GetSubItemRect() returns the entire item rect for
         // 0th subitem while we really need just the part for this column
@@ -2602,7 +2603,7 @@ static void HandleItemPaint(LPNMLVCUSTOMDRAW pLVCD, HFONT hfont)
     for ( int col = 0; col < colCount; col++ )
     {
         pLVCD->iSubItem = col;
     for ( int col = 0; col < colCount; col++ )
     {
         pLVCD->iSubItem = col;
-        HandleSubItemPrepaint(pLVCD, hfont);
+        HandleSubItemPrepaint(pLVCD, hfont, colCount);
     }
 
     HandleItemPostpaint(nmcd);
     }
 
     HandleItemPostpaint(nmcd);