Fixes for Standard WinCE SDK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f24764aa58
commit
45f272841c
@ -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
|
||||
|
||||
|
@ -778,6 +778,15 @@
|
||||
// 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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user