Added wxUSE_POCKETPC_UI to distinguish between using
combined toolbar/menubar and using separate ones git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
You have downloaded version 2.5.1 of the Windows CE port of
|
You have downloaded version 2.5.1 of the Windows CE port of
|
||||||
the wxWindows GUI library. This runs on PocketPC 2002
|
the wxWindows GUI library. This runs on PocketPC 2002,
|
||||||
and SmartPhone 2002.
|
SmartPhone 2002, and Windows CE .NET 4.x.
|
||||||
|
|
||||||
More information about the wxWindows project as a whole
|
More information about the wxWindows project as a whole
|
||||||
can be found at:
|
can be found at:
|
||||||
@@ -20,7 +20,7 @@ http://wiki.wxwindows.org/wiki.pl?Windows_CE_Port
|
|||||||
Supported platforms
|
Supported platforms
|
||||||
===================
|
===================
|
||||||
|
|
||||||
These are the supported platform at the moment:
|
These are the supported platforms at the moment:
|
||||||
|
|
||||||
- x86 emulator
|
- x86 emulator
|
||||||
- PocketPC (StrongARM)
|
- PocketPC (StrongARM)
|
||||||
@@ -28,37 +28,60 @@ These are the supported platform at the moment:
|
|||||||
You can test the library and applications using PocketPC emulator
|
You can test the library and applications using PocketPC emulator
|
||||||
and/or Compaq iPAQ or other PDAs using PocketPC
|
and/or Compaq iPAQ or other PDAs using PocketPC
|
||||||
|
|
||||||
WindowsCE.NET is not supported.
|
|
||||||
|
|
||||||
Compiler installation
|
Compiler installation
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Get the Visual C++ embedded (FREE) from Microsoft website
|
Get the Visual C++ embedded (FREE) from Microsoft website
|
||||||
http://msdn.microsoft.com/vstudio/device/embedded/download.asp
|
http://msdn.microsoft.com/vstudio/device/embedded/download.asp
|
||||||
|
|
||||||
You must use Visual Tools 3.0 for CE 3.0<EFBFBD>
|
You must use Embedded Visual C++ 3.0 or Embedded Visual C++ 4.x.
|
||||||
(this is the same we are currently using for wxWinCE)
|
|
||||||
|
|
||||||
Install selecting only the two target platforms used:
|
Install selecting only the two target platforms used:
|
||||||
|
|
||||||
- WCE x86em (PocketPC emulation)
|
- WCE x86em (PocketPC emulation)
|
||||||
- WCE ARM (PocketPC StrongARM)
|
- WCE ARM (PocketPC StrongARM)
|
||||||
|
|
||||||
Download an archive containing the library project file
|
You can install other targets but you will need
|
||||||
and a sample project file:
|
to create new configurations for them in the
|
||||||
|
wxWindows project files.
|
||||||
|
|
||||||
http://www.anthemion.co.uk/wxwin/wxWinCE.zip
|
wxWindows/CE Configuration
|
||||||
|
================================
|
||||||
|
|
||||||
Unarchive this over your wxWindows installation.
|
You may wish to customize the following file
|
||||||
|
before compiling wxWinCE:
|
||||||
|
|
||||||
|
include/wx/msw/wince/setup.h
|
||||||
|
|
||||||
|
These are some of the Windows CE-specific settings
|
||||||
|
you can adjust.
|
||||||
|
|
||||||
|
wxUSE_POCKETPC_UI
|
||||||
|
|
||||||
|
If you are compiling with Windows CE .NET, you may
|
||||||
|
wish to emulate PocketPC behaviour (set it to 1), or
|
||||||
|
take advantage of the greater flexibility of
|
||||||
|
Windows CE .NET (set it to 0).
|
||||||
|
If 0, the PocketPC-specific toolbar class will be
|
||||||
|
used, which uses commandbar to combine the toolbar
|
||||||
|
and menubar in one control. If 1, the normal menubar
|
||||||
|
and toolbar behaviour will be used, as per
|
||||||
|
desktop Windows.
|
||||||
|
|
||||||
|
wxUSE_SMARTPHONE
|
||||||
|
|
||||||
|
Set this to 1 if you wish to compile for the SmartPhone
|
||||||
|
platform (with eVC++ 3).
|
||||||
|
|
||||||
wxWindows/CE Compilation
|
wxWindows/CE Compilation
|
||||||
================================
|
================================
|
||||||
|
|
||||||
Open src/msw/wince/wxWindowsCE.vcp, select an
|
Open src/msw/wince/wxWindowsCE.vcp, select an
|
||||||
ARM or x86 target, and compile.
|
ARM or x86 target (or emulator target for eVC++ 4),
|
||||||
|
and compile.
|
||||||
|
|
||||||
Then open samples/minimal/minimalCE.vcp, select an
|
Then open samples/minimal/minimalCE.vcp, select an
|
||||||
ARM or x86 target, and compile. You can
|
ARM, x86 or emulator target, and compile. You can
|
||||||
use the emulator or real hardware to run the
|
use the emulator or real hardware to run the
|
||||||
sample.
|
sample.
|
||||||
|
|
||||||
@@ -69,7 +92,7 @@ Currently under development. For further information
|
|||||||
about what has been done and what needs to be
|
about what has been done and what needs to be
|
||||||
done, see:
|
done, see:
|
||||||
|
|
||||||
http://wiki.wxwindows.org/wiki.pl?Windows_CE_Port
|
http://wiki.wxwindows.org/wiki.pl?Developers_Notebook/WxWinCE
|
||||||
|
|
||||||
Disclaimer
|
Disclaimer
|
||||||
==========
|
==========
|
||||||
|
@@ -172,7 +172,7 @@ public:
|
|||||||
virtual void Detach();
|
virtual void Detach();
|
||||||
virtual void Attach(wxFrame *frame);
|
virtual void Attach(wxFrame *frame);
|
||||||
|
|
||||||
#if defined(__WXWINCE__) && wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR && defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
// Under WinCE, a menubar is owned by the frame's toolbar
|
// Under WinCE, a menubar is owned by the frame's toolbar
|
||||||
void SetToolBar(wxToolBar* toolBar) { m_toolBar = toolBar; }
|
void SetToolBar(wxToolBar* toolBar) { m_toolBar = toolBar; }
|
||||||
wxToolBar* GetToolBar() const { return m_toolBar; }
|
wxToolBar* GetToolBar() const { return m_toolBar; }
|
||||||
@@ -214,6 +214,12 @@ protected:
|
|||||||
#if defined(__WXWINCE__) && wxUSE_TOOLBAR
|
#if defined(__WXWINCE__) && wxUSE_TOOLBAR
|
||||||
wxToolBar* m_toolBar;
|
wxToolBar* m_toolBar;
|
||||||
#endif
|
#endif
|
||||||
|
// 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 && !wxUSE_POCKETPC_UI)
|
||||||
|
WXHWND m_commandBar;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar)
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar)
|
||||||
|
@@ -146,9 +146,9 @@
|
|||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 (unless you only plan to use Windows NT/2000/XP)
|
// Recommended setting: 1
|
||||||
#ifndef wxUSE_UNICODE
|
#ifndef wxUSE_UNICODE
|
||||||
#define wxUSE_UNICODE 0
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set wxUSE_UNICODE_MSLU to 1 if you want to compile wxWindows in Unicode mode
|
// Set wxUSE_UNICODE_MSLU to 1 if you want to compile wxWindows in Unicode mode
|
||||||
@@ -1061,9 +1061,26 @@
|
|||||||
// (notably, wxNotebook pages)
|
// (notably, wxNotebook pages)
|
||||||
#define wxUSE_UXTHEME_AUTO 0
|
#define wxUSE_UXTHEME_AUTO 0
|
||||||
|
|
||||||
// Set to 1 to if you're developing for MS SmartPhone
|
// Set to 1 if you're developing for MS SmartPhone
|
||||||
#define wxUSE_SMARTPHONE 0
|
#define wxUSE_SMARTPHONE 0
|
||||||
|
|
||||||
|
// Set to 1 if you want to maintain a PocketPC-style UI on
|
||||||
|
// Windows CE .NET. If 0, wxWindows will use a commandbar
|
||||||
|
// for the menubar, and a normal separate toolbar as per the
|
||||||
|
// desktop implementation. If 1, wxWindows will combine
|
||||||
|
// the toolbar and menubar as per the PocketPC implementation.
|
||||||
|
//
|
||||||
|
// Note that at present, the dynamic loading of PocketPC
|
||||||
|
// shell functions on WinCE .NET is not yet done, and a
|
||||||
|
// simple commandbar implementation is used instead of the
|
||||||
|
// PocketPC one. The intention is to use the PocketPC style
|
||||||
|
// when available (when wxUSE_POCKETPC_UI is 1).
|
||||||
|
//
|
||||||
|
// So if you're using WinCE .NET, and wxUSE_POCKETPC_UI is 0,
|
||||||
|
// you will be able to create separate toolbars and menubars,
|
||||||
|
// but _not_ the combined toolbar/menubar.
|
||||||
|
#define wxUSE_POCKETPC_UI 1
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// obsolete settings
|
// obsolete settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -123,10 +123,10 @@ enum
|
|||||||
#else // wxUSE_TOOLBAR_NATIVE
|
#else // wxUSE_TOOLBAR_NATIVE
|
||||||
#if defined(__WXUNIVERSAL__)
|
#if defined(__WXUNIVERSAL__)
|
||||||
#include "wx/univ/toolbar.h"
|
#include "wx/univ/toolbar.h"
|
||||||
|
#elif defined(__WXMSW__) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI))
|
||||||
|
#include "wx/msw/tbar95.h"
|
||||||
#elif defined(__WXWINCE__)
|
#elif defined(__WXWINCE__)
|
||||||
#include "wx/msw/wince/tbarwce.h"
|
#include "wx/msw/wince/tbarwce.h"
|
||||||
#elif defined(__WXMSW__) && defined(__WIN95__)
|
|
||||||
#include "wx/msw/tbar95.h"
|
|
||||||
#elif defined(__WXMSW__)
|
#elif defined(__WXMSW__)
|
||||||
#include "wx/msw/tbarmsw.h"
|
#include "wx/msw/tbarmsw.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
|
@@ -519,7 +519,7 @@ void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
|
|||||||
|
|
||||||
DetachMenuBar();
|
DetachMenuBar();
|
||||||
|
|
||||||
AttachMenuBar(menubar);
|
this->AttachMenuBar(menubar);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
@@ -320,6 +320,18 @@ void wxFrame::PositionStatusBar()
|
|||||||
|
|
||||||
void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
||||||
{
|
{
|
||||||
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
|
if (!GetToolBar())
|
||||||
|
{
|
||||||
|
wxToolBar* toolBar = new wxToolBar(this, -1,
|
||||||
|
wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxBORDER_NONE | wxTB_HORIZONTAL,
|
||||||
|
wxToolBarNameStr, GetMenuBar());
|
||||||
|
SetToolBar(toolBar);
|
||||||
|
menubar->SetToolBar(toolBar);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxFrameBase::AttachMenuBar(menubar);
|
wxFrameBase::AttachMenuBar(menubar);
|
||||||
|
|
||||||
if ( !menubar )
|
if ( !menubar )
|
||||||
@@ -330,7 +342,7 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
|||||||
}
|
}
|
||||||
else // set new non NULL menu bar
|
else // set new non NULL menu bar
|
||||||
{
|
{
|
||||||
#ifndef __WXWINCE__
|
#if !defined(__WXWINCE__) || (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI)
|
||||||
// Can set a menubar several times.
|
// Can set a menubar several times.
|
||||||
if ( menubar->GetHMenu() )
|
if ( menubar->GetHMenu() )
|
||||||
{
|
{
|
||||||
@@ -353,18 +365,8 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
|||||||
|
|
||||||
void wxFrame::InternalSetMenuBar()
|
void wxFrame::InternalSetMenuBar()
|
||||||
{
|
{
|
||||||
#ifdef __WXMICROWIN__
|
#if defined(__WXMICROWIN__) || defined(__WXWINCE__)
|
||||||
// Nothing
|
// Nothing
|
||||||
#elif defined(__WXWINCE__)
|
|
||||||
|
|
||||||
if (!GetToolBar())
|
|
||||||
{
|
|
||||||
wxToolBar* toolBar = new wxToolBar(this, -1,
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxBORDER_NONE | wxTB_HORIZONTAL,
|
|
||||||
wxToolBarNameStr, GetMenuBar());
|
|
||||||
SetToolBar(toolBar);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) )
|
if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) )
|
||||||
{
|
{
|
||||||
@@ -403,7 +405,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
|||||||
if (show)
|
if (show)
|
||||||
{
|
{
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
// TODO: hide commandbar
|
// TODO: hide commandbar
|
||||||
#else
|
#else
|
||||||
wxToolBar *theToolBar = GetToolBar();
|
wxToolBar *theToolBar = GetToolBar();
|
||||||
@@ -420,8 +422,10 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
|||||||
#endif // __WXWINCE__
|
#endif // __WXWINCE__
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
|
#if defined(__WXMICROWIN__)
|
||||||
|
#elif defined(__WXWINCE__)
|
||||||
// TODO: make it work for WinCE
|
// TODO: make it work for WinCE
|
||||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
#else
|
||||||
if (style & wxFULLSCREEN_NOMENUBAR)
|
if (style & wxFULLSCREEN_NOMENUBAR)
|
||||||
SetMenu((HWND)GetHWND(), (HMENU) NULL);
|
SetMenu((HWND)GetHWND(), (HMENU) NULL);
|
||||||
#endif
|
#endif
|
||||||
@@ -446,7 +450,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
// TODO: show commandbar
|
// TODO: show commandbar
|
||||||
#else
|
#else
|
||||||
wxToolBar *theToolBar = GetToolBar();
|
wxToolBar *theToolBar = GetToolBar();
|
||||||
@@ -472,8 +476,10 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
|||||||
}
|
}
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
|
#if defined(__WXMICROWIN__)
|
||||||
|
#elif defined(__WXWINCE__)
|
||||||
// TODO: make it work for WinCE
|
// TODO: make it work for WinCE
|
||||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
#else
|
||||||
if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0))
|
if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0))
|
||||||
SetMenu((HWND)GetHWND(), (HMENU)m_hMenu);
|
SetMenu((HWND)GetHWND(), (HMENU)m_hMenu);
|
||||||
#endif
|
#endif
|
||||||
@@ -490,7 +496,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
|
|||||||
|
|
||||||
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
// We may already have a toolbar from calling SetMenuBar.
|
// We may already have a toolbar from calling SetMenuBar.
|
||||||
if (GetToolBar())
|
if (GetToolBar())
|
||||||
return GetToolBar();
|
return GetToolBar();
|
||||||
@@ -508,7 +514,7 @@ void wxFrame::PositionToolBar()
|
|||||||
wxToolBar *toolbar = GetToolBar();
|
wxToolBar *toolbar = GetToolBar();
|
||||||
if ( toolbar && toolbar->IsShown() )
|
if ( toolbar && toolbar->IsShown() )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
// We want to do something different in WinCE, because
|
// We want to do something different in WinCE, because
|
||||||
// the toolbar should be associated with the commandbar,
|
// the toolbar should be associated with the commandbar,
|
||||||
// and not an independent window.
|
// and not an independent window.
|
||||||
|
@@ -673,8 +673,14 @@ void wxMenuBar::Init()
|
|||||||
{
|
{
|
||||||
m_eventHandler = this;
|
m_eventHandler = this;
|
||||||
m_hMenu = 0;
|
m_hMenu = 0;
|
||||||
#ifdef __WXWINCE__
|
#if wxUSE_TOOLBAR && defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
m_toolBar = NULL;
|
m_toolBar = NULL;
|
||||||
|
#endif
|
||||||
|
// Not using a combined wxToolBar/wxMenuBar? then use
|
||||||
|
// a commandbar in WinCE .NET just to implement the
|
||||||
|
// menubar.
|
||||||
|
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI)
|
||||||
|
m_commandBar = NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,9 +711,9 @@ wxMenuBar::wxMenuBar(int count, wxMenu *menus[], const wxString titles[])
|
|||||||
|
|
||||||
wxMenuBar::~wxMenuBar()
|
wxMenuBar::~wxMenuBar()
|
||||||
{
|
{
|
||||||
// In Windows CE, the menubar is always associated
|
// In Windows CE (not .NET), the menubar is always associated
|
||||||
// with a toolbar, which destroys the menu implicitly.
|
// with a toolbar, which destroys the menu implicitly.
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
if (GetToolBar())
|
if (GetToolBar())
|
||||||
GetToolBar()->SetMenuBar(NULL);
|
GetToolBar()->SetMenuBar(NULL);
|
||||||
#else
|
#else
|
||||||
@@ -715,7 +721,12 @@ wxMenuBar::~wxMenuBar()
|
|||||||
// which happens if we're attached to a frame
|
// which happens if we're attached to a frame
|
||||||
if (m_hMenu && !IsAttached())
|
if (m_hMenu && !IsAttached())
|
||||||
{
|
{
|
||||||
|
#if defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI)
|
||||||
|
::DestroyWindow((HWND) m_commandBar);
|
||||||
|
m_commandBar = (WXHWND) NULL;
|
||||||
|
#else
|
||||||
::DestroyMenu((HMENU)m_hMenu);
|
::DestroyMenu((HMENU)m_hMenu);
|
||||||
|
#endif
|
||||||
m_hMenu = (WXHMENU)NULL;
|
m_hMenu = (WXHMENU)NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -729,11 +740,14 @@ void wxMenuBar::Refresh()
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( IsAttached(), wxT("can't refresh unattached menubar") );
|
wxCHECK_RET( IsAttached(), wxT("can't refresh unattached menubar") );
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
if (GetToolBar())
|
if (GetToolBar())
|
||||||
{
|
{
|
||||||
CommandBar_DrawMenuBar((HWND) GetToolBar()->GetHWND(), 0);
|
CommandBar_DrawMenuBar((HWND) GetToolBar()->GetHWND(), 0);
|
||||||
}
|
}
|
||||||
|
#elif defined(__WXWINCE__) && (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI)
|
||||||
|
if (m_commandBar)
|
||||||
|
DrawMenuBar((HWND) m_commandBar);
|
||||||
#else
|
#else
|
||||||
DrawMenuBar(GetHwndOf(GetFrame()));
|
DrawMenuBar(GetHwndOf(GetFrame()));
|
||||||
#endif
|
#endif
|
||||||
@@ -806,17 +820,6 @@ 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;
|
return m_hMenu;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -953,7 +956,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
|||||||
|
|
||||||
if ( IsAttached() )
|
if ( IsAttached() )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
if (!GetToolBar())
|
if (!GetToolBar())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
TBBUTTON tbButton;
|
TBBUTTON tbButton;
|
||||||
@@ -1007,7 +1010,7 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
|
|||||||
|
|
||||||
if ( IsAttached() )
|
if ( IsAttached() )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
if (!GetToolBar())
|
if (!GetToolBar())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
TBBUTTON tbButton;
|
TBBUTTON tbButton;
|
||||||
@@ -1058,7 +1061,7 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
|||||||
|
|
||||||
if ( IsAttached() )
|
if ( IsAttached() )
|
||||||
{
|
{
|
||||||
#ifdef __WXWINCE__
|
#if defined(__WXWINCE__) && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
if (GetToolBar())
|
if (GetToolBar())
|
||||||
{
|
{
|
||||||
if (!::SendMessage((HWND) GetToolBar()->GetHWND(), TB_DELETEBUTTON, (UINT) pos, (LPARAM) 0))
|
if (!::SendMessage((HWND) GetToolBar()->GetHWND(), TB_DELETEBUTTON, (UINT) pos, (LPARAM) 0))
|
||||||
@@ -1125,6 +1128,36 @@ void wxMenuBar::Attach(wxFrame *frame)
|
|||||||
{
|
{
|
||||||
wxMenuBarBase::Attach(frame);
|
wxMenuBarBase::Attach(frame);
|
||||||
|
|
||||||
|
#if defined(__WXWINCE__) && _WIN32_WCE >= 400
|
||||||
|
if (!m_hMenu)
|
||||||
|
this->Create();
|
||||||
|
#if wxUSE_POCKETPC_UI
|
||||||
|
if (GetToolBar())
|
||||||
|
{
|
||||||
|
HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
|
||||||
|
if (!CommandBar_InsertMenubarEx(hCommandBar, NULL, (LPTSTR) m_hMenu, 0))
|
||||||
|
{
|
||||||
|
wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!m_commandBar)
|
||||||
|
m_commandBar = (WXHWND) CommandBar_Create(wxGetInstance(), (HWND) frame->GetHWND(), NewControlId());
|
||||||
|
if (m_commandBar)
|
||||||
|
{
|
||||||
|
if (m_hMenu)
|
||||||
|
{
|
||||||
|
if (!CommandBar_InsertMenubarEx((HWND) m_commandBar, NULL, (LPTSTR) m_hMenu, 0))
|
||||||
|
{
|
||||||
|
wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// wxUSE_POCKETPC_UI
|
||||||
|
#endif
|
||||||
|
// __WXWINCE__ && _WIN32_WCE >= 400
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
RebuildAccelTable();
|
RebuildAccelTable();
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR && defined(__WIN95__) && wxUSE_TOOLBAR_NATIVE
|
#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !wxUSE_POCKETPC_UI))
|
||||||
|
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
|
|
||||||
|
@@ -39,7 +39,9 @@
|
|||||||
#include "wx/control.h"
|
#include "wx/control.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE
|
// Use the WinCE-specific toolbar only if we're either compiling
|
||||||
|
// with a WinCE earlier than 4, or we wish to emulate a PocketPC-style UI
|
||||||
|
#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (_WIN32_WCE < 400 || wxUSE_POCKETPC_UI)
|
||||||
|
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
|
|
||||||
|
@@ -2253,6 +2253,12 @@ SOURCE=..\tabctrl.cpp
|
|||||||
SOURCE=..\taskbar.cpp
|
SOURCE=..\taskbar.cpp
|
||||||
|
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\tbar95.cpp
|
||||||
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user