// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "menuce"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/wx.h"
-#endif
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/menu.h"
#endif //WX_PRECOMP
-#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
-
#include <windows.h>
#include <ole2.h>
#include <shellapi.h>
#include <aygshell.h>
+#include <tpcshell.h>
+#include <tpcuser.h>
#include "wx/msw/wince/missing.h"
#include "wx/msw/wince/resources.h"
::ShowWindow( prev_MenuBar, SW_HIDE );
::ShowWindow( m_MenuBarHWND, SW_SHOW );
+ // Setup backspace key handling
+ SendMessage(m_MenuBarHWND, SHCMBM_OVERRIDEKEY, VK_TBACK,
+ MAKELPARAM( SHMBOF_NODEFAULT | SHMBOF_NOTIFY,
+ SHMBOF_NODEFAULT | SHMBOF_NOTIFY ));
}
bool wxTopLevelWindowMSW::HandleCommand(WXWORD id, WXWORD WXUNUSED(cmd), WXHWND WXUNUSED(control))
return false;
}
-#endif // __SMARTPHONE__ && __WXWINCE__
+bool wxTopLevelWindowMSW::MSWShouldPreProcessMessage(WXMSG* pMsg)
+{
+ MSG *msg = (MSG *)pMsg;
+
+ // Process back key to be like backspace.
+ if (msg->message == WM_HOTKEY)
+ {
+ if (HIWORD(msg->lParam) == VK_TBACK)
+ SHSendBackToFocusWindow(msg->message, msg->wParam, msg->lParam);
+ }
+ return wxTopLevelWindowBase::MSWShouldPreProcessMessage(pMsg);
+}
+
+#endif // __SMARTPHONE__ && __WXWINCE__