]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
recognize ESC[APE] in menu accel strings (patch 733967)
[wxWidgets.git] / src / msw / listbox.cpp
index 662b86359f84311d0464eab760e2e14e3ba41734..655dea67220d5958f65c2bb76c92ce53f8ab5af9 100644 (file)
@@ -6,7 +6,7 @@
 // Created:
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Created:
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -123,8 +123,8 @@ bool wxListBox::Create(wxWindow *parent,
     int height = size.y;
     m_windowStyle = style;
 
     int height = size.y;
     m_windowStyle = style;
 
-    DWORD wstyle = WS_VISIBLE | WS_VSCROLL | WS_TABSTOP |
-                   LBS_NOTIFY | LBS_HASSTRINGS /* | WS_CLIPSIBLINGS */;
+    DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_VSCROLL | WS_TABSTOP |
+                   LBS_NOTIFY | LBS_HASSTRINGS ;
 
     wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
                   _T("only one of listbox selection modes can be specified") );
 
     wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
                   _T("only one of listbox selection modes can be specified") );
@@ -158,32 +158,17 @@ bool wxListBox::Create(wxWindow *parent,
     // doesn't work properly
     wstyle |= LBS_NOINTEGRALHEIGHT;
 
     // doesn't work properly
     wstyle |= LBS_NOINTEGRALHEIGHT;
 
-    bool want3D;
-    WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D);
-
-    // Even with extended styles, need to combine with WS_BORDER for them to
-    // look right.
-    if ( want3D || wxStyleHasBorder(m_windowStyle) )
-    {
-        wstyle |= WS_BORDER;
-    }
+    WXDWORD exStyle = 0;
+    (void) MSWGetStyle(style, & exStyle) ;
 
     m_hWnd = (WXHWND)::CreateWindowEx(exStyle, wxT("LISTBOX"), NULL,
 
     m_hWnd = (WXHWND)::CreateWindowEx(exStyle, wxT("LISTBOX"), NULL,
-            wstyle | WS_CHILD,
+            wstyle ,
             0, 0, 0, 0,
             (HWND)parent->GetHWND(), (HMENU)m_windowId,
             wxGetInstance(), NULL);
 
     wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create listbox") );
 
             0, 0, 0, 0,
             (HWND)parent->GetHWND(), (HMENU)m_windowId,
             wxGetInstance(), NULL);
 
     wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create listbox") );
 
-#if wxUSE_CTL3D
-    if (want3D)
-    {
-        Ctl3dSubclassCtl(GetHwnd());
-        m_useCtl3D = TRUE;
-    }
-#endif
-
     // Subclass again to catch messages
     SubclassWin(m_hWnd);
 
     // Subclass again to catch messages
     SubclassWin(m_hWnd);