]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
added Show/HideNativeCaret() (patch 759924)
[wxWidgets.git] / src / msw / listctrl.cpp
index 4d906a5c85a5a59eeb07c4ef99b60688e9fed84a..c4598991730b07184c0f2d32f5ce34a83dc64770 100644 (file)
@@ -313,7 +313,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h)
     // Create the ListView control.
     m_hWnd = (WXHWND)CreateWindowEx(exStyle,
                                     WC_LISTVIEW,
-                                    wxT(""),
+                                    wxEmptyString,
                                     wstyle,
                                     x, y, w, h,
                                     GetWinHwnd(GetParent()),
@@ -2080,21 +2080,18 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
                     eventType = wxEVT_COMMAND_LIST_CACHE_HINT;
 
-                    // we get some really stupid cache hints like ones for items in
-                    // range 0..0 for an empty control or, after deleting an item,
-                    // for items in invalid range - filter this garbage out
-                    if ( cacheHint->iFrom < cacheHint->iTo )
-                    {
-                        event.m_oldItemIndex = cacheHint->iFrom;
-
-                        long iMax = GetItemCount();
-                        event.m_itemIndex = cacheHint->iTo < iMax ? cacheHint->iTo
-                                                                  : iMax - 1;
-                    }
-                    else
-                    {
+                    // we get some really stupid cache hints like ones for
+                    // items in range 0..0 for an empty control or, after
+                    // deleting an item, for items in invalid range -- filter
+                    // this garbage out
+                    if ( cacheHint->iFrom > cacheHint->iTo )
                         return FALSE;
-                    }
+
+                    event.m_oldItemIndex = cacheHint->iFrom;
+
+                    const long iMax = GetItemCount();
+                    event.m_itemIndex = cacheHint->iTo < iMax ? cacheHint->iTo
+                                                              : iMax - 1;
                 }
                 break;