]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes for Standard WinCE SDK
authorJulian Smart <julian@anthemion.co.uk>
Thu, 27 May 2004 09:09:19 +0000 (09:09 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 27 May 2004 09:09:19 +0000 (09:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/menu.h
include/wx/msw/wince/setup.h
include/wx/toplevel.h
src/common/framecmn.cpp
src/msw/frame.cpp
src/msw/tbar95.cpp
src/msw/toplevel.cpp

index be8a023694774748c4d5f910b422f53161348d15..0dc031793e946a8b306b63f46303aa4c6d131e10 100644 (file)
@@ -178,6 +178,10 @@ public:
     wxToolBar* GetToolBar() const { return m_toolBar; }
 #endif
 
+#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP))
+    WXHWND GetCommandBar() const { return m_commandBar; }
+#endif
+
 #if wxUSE_ACCEL
     // get the accel table for all the menus
     const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
@@ -220,7 +224,7 @@ protected:
     // Not using a combined wxToolBar/wxMenuBar? then use
     // a commandbar in WinCE .NET to implement the
     // menubar, since there is no ::SetMenu function.
-#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && defined(WIN32_PLATFORM_WFSP))
+#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP))
     WXHWND      m_commandBar;
 #endif
 
index 33151539f33f10dcaea8a3fa87e4621214e54284..388371714a6bf0fa5d0d579c22c4b87fccd24a99 100644 (file)
 // Set to 0 to disable document/view architecture
 #define wxUSE_DOC_VIEW_ARCHITECTURE 1
 
+// Set to 0 to disable MDI support.
+//
+// Requires wxUSE_NOTEBOOK under platforms other than MSW.
+//
+// Default is 1.
+//
+// Recommended setting: 1, can be safely set to 0.
+#define wxUSE_MDI 0
+
 // Set to 0 to disable MDI document/view architecture
 #define wxUSE_MDI_ARCHITECTURE    0
 
index 8ad1a568d0349239314e892942ad4c1161c1b9ea..24325e0afe574c7daf434d06ba15623e114c0149 100644 (file)
@@ -65,7 +65,7 @@ class WXDLLEXPORT wxTopLevelWindowBase;
 // "correctly", i.e. as full screen windows with a "hide" button (same as
 // "close" but round instead of squared and just hides the applications
 // instead of closing it) in the title bar
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && !defined(WCE_PLATFORM_STANDARDSDK)
        #ifdef __SMARTPHONE__
                #define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE)
        #else
index f45162744039db5c8ff5565ec9f1aed1e56c4534..1b8448f0adf27772a2e35dd7320563c0de5ba531 100644 (file)
@@ -174,6 +174,15 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
     }
 #endif // wxUSE_TOOLBAR
 
+#if defined(__WXWINCE__) && defined(WCE_PLATFORM_STANDARDSDK)
+       if (GetMenuBar() && GetMenuBar()->GetCommandBar())
+       {
+               RECT rect;
+               ::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);
+               pt.y += (rect.bottom - rect.top);
+       }
+#endif
+
     return pt;
 }
 
index 4b7181dd0315374c2ede4af6422cb59d758d6444..32c1b2a9e3675e4dca1a4d30d2db332763b7c726 100644 (file)
@@ -545,6 +545,18 @@ void wxFrame::PositionToolBar()
         }
 #endif // wxUSE_STATUSBAR
 
+               int x = 0;
+               int y = 0;
+#if defined(__WXWINCE__)
+               // We're using a commandbar - so we have to allow for it.
+               if (GetMenuBar() && GetMenuBar()->GetCommandBar())
+               {
+                       RECT rect;
+                       ::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);
+                       y = rect.bottom - rect.top;
+               }
+#endif
+
         int tx, ty;
         int tw, th;
         toolbar->GetPosition(&tx, &ty);
@@ -600,7 +612,7 @@ void wxFrame::PositionToolBar()
         }
         
         if (tx != 0 || ty != 0 || widthChanging || heightChanging)
-            toolbar->SetSize(0, 0, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
+            toolbar->SetSize(x, y, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
         
 #endif // __WXWINCE__
     }
@@ -793,6 +805,23 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
         PositionToolBar();
 #endif // wxUSE_TOOLBAR
 
+#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP))
+               // Position the menu command bar
+               if (GetMenuBar() && GetMenuBar()->GetCommandBar())
+               {
+                       RECT rect;
+                       ::GetWindowRect((HWND) GetMenuBar()->GetCommandBar(), &rect);
+                       wxSize clientSz = GetClientSize();
+
+                       if ( !::MoveWindow((HWND) GetMenuBar()->GetCommandBar(), 0, 0, clientSz.x, rect.bottom - rect.top, true ) )
+                       {
+                               wxLogLastError(wxT("MoveWindow"));
+                       }
+                       
+               }
+#endif
+
+
         processed = wxWindow::HandleSize(x, y, id);
     }
 
index 8d8c01735cee559bc78a99b5d6aace0bd626eddc..90ec836dbd23e4f18eedc0f866a81994baf70176 100644 (file)
@@ -39,7 +39,7 @@
     #include "wx/control.h"
 #endif
 
-#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && defined(WIN32_PLATFORM_WFSP)))
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(WIN32_PLATFORM_PSPC) && !defined(WIN32_PLATFORM_WFSP)))
 
 #include "wx/toolbar.h"
 #include "wx/sysopt.h"
index 683c6c3e165809d48e2f9d96b0409bf64f46e72d..27cc54f56eb1d3be2b57e09c815aa4d32a0198f9 100644 (file)
@@ -214,7 +214,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
     if ( exflags )
     {
         // there is no taskbar under CE, so omit all this
-#ifndef __WXWINCE__
+#if !defined(__WXWINCE__)
         if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
         {
             if ( style & wxFRAME_TOOL_WINDOW )
@@ -388,7 +388,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
         y = (sizeDpy.y - h) / 2;
     }
 
-#ifndef __WXWINCE__
+#if !defined(__WXWINCE__) || defined(WCE_PLATFORM_STANDARDSDK)
     if ( !::MoveWindow(GetHwnd(), x, y, w, h, FALSE) )
     {
         wxLogLastError(wxT("MoveWindow"));