]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Use Update() instead of yielding and waiting for the update to happen there.
[wxWidgets.git] / src / msw / listctrl.cpp
index cef12e2f49ef5bbdd6387022074bcabb03dcd795..65ed0d1182eb435c0673727e190aff0263b508ab 100644 (file)
@@ -350,7 +350,7 @@ bool wxListCtrl::Create(wxWindow *parent,
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
         return false;
 
-    if ( !MSWCreateControl(WC_LISTVIEW, _T(""), pos, size) )
+    if ( !MSWCreateControl(WC_LISTVIEW, wxEmptyString, pos, size) )
         return false;
 
     // explicitly say that we want to use Unicode because otherwise we get ANSI
@@ -728,8 +728,7 @@ bool wxListCtrl::GetItem(wxListItem& info) const
     if ( info.m_mask & wxLIST_MASK_STATE )
     {
         lvItem.mask |= LVIF_STATE;
-        // the other bits are hardly interesting anyhow
-        lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
+        wxConvertToMSWFlags(0, info.m_stateMask, lvItem);
     }
 
     bool success = ListView_GetItem((HWND)GetHWND(), &lvItem) != 0;
@@ -1265,7 +1264,6 @@ bool wxListCtrl::DeleteItem(long item)
 // Deletes all items
 bool wxListCtrl::DeleteAllItems()
 {
-    m_count=0;
     return ListView_DeleteAllItems(GetHwnd()) != 0;
 }
 
@@ -2386,6 +2384,21 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
     }
 }
 
+WXLRESULT
+wxListCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+#ifdef WM_PRINT
+    if ( nMsg == WM_PRINT )
+    {
+        // we should bypass our own WM_PRINT handling as we don't handle
+        // PRF_CHILDREN flag, so leave it to the native control itself
+        return MSWDefWindowProc(nMsg, wParam, lParam);
+    }
+#endif // WM_PRINT
+
+    return wxControl::MSWWindowProc(nMsg, wParam, lParam);
+}
+
 // ----------------------------------------------------------------------------
 // virtual list controls
 // ----------------------------------------------------------------------------