]> git.saurik.com Git - wxWidgets.git/commitdiff
WinCE 4 cleanup
authorJulian Smart <julian@anthemion.co.uk>
Sat, 27 Dec 2003 17:24:00 +0000 (17:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 27 Dec 2003 17:24:00 +0000 (17:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp
src/msw/menu.cpp
src/msw/toplevel.cpp
src/msw/wince/tbarwce.cpp

index 37cc646f05037bc3fd248ea56dadc522eb6d8c42..3e9b5966cbb79c2060a07385d00085d5c01966fa 100644 (file)
@@ -48,7 +48,9 @@
 #if defined(__WXWINCE__)
   #include <ole2.h>
   #include <shellapi.h>
-  #include <aygshell.h>
+  #if _WIN32_WCE < 400
+    #include <aygshell.h>
+  #endif
 #endif
 
 // include <commctrl.h> "properly"
@@ -1808,7 +1810,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 event.m_col = nmHDR->iItem;
                 break;
 
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
             case GN_CONTEXTMENU:
 #endif //__WXWINCE__
             case NM_RCLICK:
@@ -1822,7 +1824,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
                     // where did the click occur?
                     POINT ptClick;
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
                   if(nmhdr->code == GN_CONTEXTMENU) {
                       ptClick = ((NMRGINFO*)nmhdr)->ptAction;
                   } else 
@@ -2142,7 +2144,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 event.m_item.m_data = GetItemData(iItem);
                 break;
 
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
             case GN_CONTEXTMENU:
 #endif //__WXWINCE__
             case NM_RCLICK:
@@ -2157,7 +2159,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 LV_HITTESTINFO lvhti;
                 wxZeroMemory(lvhti);
 
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
               if(nmhdr->code == GN_CONTEXTMENU) {
                   lvhti.pt = ((NMRGINFO*)nmhdr)->ptAction;
               } else 
index d8c27dcd257617ca0d17e6422a747a645d35003b..bcc1febf1d6f8ee186c5c816f3333b764accbd6f 100644 (file)
 #include <ole2.h>
 #include <shellapi.h>
 #include <commctrl.h>
+#if _WIN32_WCE < 400
 #include <aygshell.h>
-
-#ifndef TBSTYLE_NO_DROPDOWN_ARROW
-#define TBSTYLE_NO_DROPDOWN_ARROW 0x0080
 #endif
 
+#include "wx/msw/wince/missing.h"
+
 #endif
 
 // other standard headers
@@ -745,7 +745,7 @@ WXHMENU wxMenuBar::Create()
     // since you have to use resources.
     // We'll have to find another way to add a menu
     // by changing/adding menu items to an existing menu.
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
     if ( m_hMenu != 0 )
         return m_hMenu;
 
@@ -806,6 +806,17 @@ WXHMENU wxMenuBar::Create()
         }
     }
 
+#if _WIN32_WCE >= 400
+    if (GetToolBar())
+    {
+        HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
+        if (!CommandBar_InsertMenubarEx(hCommandBar, NULL, (LPTSTR) m_hMenu, 0))
+        {
+            wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
+        }
+    }
+#endif
+
     return m_hMenu;
 #endif
 }
index 7f9e9ade6d07de6c49f10cd8f273bc2f2e2e3a1a..9c1391dbbe72bffde82d7757c6aea7812fa807e3 100644 (file)
 #if defined(__WXWINCE__)
   #include <ole2.h>
   #include <shellapi.h>
-  #include <aygshell.h>
+  #if _WIN32_WCE < 400
+    #include <aygshell.h>
+  #endif
+#include "wx/msw/wince/missing.h"
 #endif
 
 #include "wx/msw/winundef.h"
@@ -737,7 +740,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
                      rect.x, rect.y, rect.width, rect.height,
                      flags);
 
-#ifdef __WXWINCE__
+#if __WXWINCE__ && _WIN32_WCE < 400
         ::SHFullScreen(GetHwnd(), SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);
 #endif
 
@@ -747,7 +750,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
     }
     else // stop showing full screen
     {
-#ifdef __WXWINCE__
+#if __WXWINCE__ && _WIN32_WCE < 400
         ::SHFullScreen(GetHwnd(), SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON);
 #endif
         Maximize(m_fsIsMaximized);
index a1be85a8c6ee174c7b5c412fc72c5624a13f9ffd..79baa1c7b22299f3d878b5770c36d418e51f7dee 100644 (file)
 #include <ole2.h>
 #include <shellapi.h>
 #include <commctrl.h>
-#include <aygshell.h>
+#if _WIN32_WCE < 400
+  #include <aygshell.h>
+#endif
+#include "wx/msw/wince/missing.h"
 
 #include "wx/msw/winundef.h"
 
@@ -256,6 +259,10 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size, wxMenuB
     if (m_menuBar)
         m_menuBar->SetToolBar(this);
 
+#if _WIN32_WCE >= 400
+    HWND hWnd = CommandBar_Create(wxGetInstance(), (HWND) GetParent()->GetHWND(), GetId());
+    SetHWND((WXHWND) hWnd);
+#else
     // Create the menubar.
     SHMENUBARINFO mbi;
     
@@ -279,12 +286,8 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size, wxMenuB
     }
     
     SetHWND((WXHWND) mbi.hwndMB);
-/*
-    if (!::SendMessage((HWND) GetHWND(), TB_DELETEBUTTON, 0, (LPARAM) 0))
-    {
-        wxLogLastError(wxT("TB_DELETEBUTTON"));
-    }
-*/    
+#endif
+
     // install wxWindows window proc for this window
     SubclassWin(m_hWnd);