]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Applied patch [ 739063 ] window.cpp (gtk) - mouse event processing
[wxWidgets.git] / src / msw / listctrl.cpp
index 73d138f1e30eb2dc629009c47573e30a1004961e..02cbeb0947973a5dd56cea4fa83681711ac757cd 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "wx/msw/private.h"
 
-#if ((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
     #include "wx/msw/gnuwin32/extra.h"
 #else
     #include <commctrl.h>
@@ -304,10 +304,11 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h)
     DWORD wstyle = m_baseStyle;
 
     WXDWORD exStyle = 0;
-    (void) MSWGetStyle(GetWindowStyle(), & exStyle) ;
+    WXDWORD standardStyle = MSWGetStyle(GetWindowStyle(), & exStyle) ;
 
     long oldStyle = 0; // Dummy
     wstyle |= ConvertToMSWStyle(oldStyle, m_windowStyle);
+    wstyle |= standardStyle;
 
     // Create the ListView control.
     m_hWnd = (WXHWND)CreateWindowEx(exStyle,
@@ -2350,7 +2351,7 @@ void wxListCtrl::SetItemCount(long count)
 {
     wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") );
 
-    if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, 0) )
+    if ( !::SendMessage(GetHwnd(), LVM_SETITEMCOUNT, (WPARAM)count, LVSICF_NOSCROLL) )
     {
         wxLogLastError(_T("ListView_SetItemCount"));
     }