summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@trolltech.com>2009-05-15 13:23:00 (GMT)
committerGeir Vattekar <geir.vattekar@trolltech.com>2009-05-15 13:23:00 (GMT)
commitfe7040348d82c5e5d302e7ec674fc0e3f68f06e1 (patch)
tree6b40b8c1e69a044aebd23f7b137d9abb4720b5e8 /src/gui/widgets
parenta830e5f22a42d00b0b92544cfcb56c79b2c3b6cd (diff)
parent3875cd2b0a81c190939ea2803a2efbe890ae38ec (diff)
downloadQt-fe7040348d82c5e5d302e7ec674fc0e3f68f06e1.zip
Qt-fe7040348d82c5e5d302e7ec674fc0e3f68f06e1.tar.gz
Qt-fe7040348d82c5e5d302e7ec674fc0e3f68f06e1.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmenu_wince.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp
index ea58d46..42a4e0b 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -58,6 +58,9 @@
#include <QtCore/qlibrary.h>
#include <commctrl.h>
+#if Q_OS_WINCE_WM
+# include <windowsm.h>
+#endif
#include "qguifunctions_wince.h"
@@ -71,6 +74,12 @@
#define SHCMBM_GETSUBMENU (WM_USER + 401)
#endif
+#ifdef Q_OS_WINCE_WM
+# define SHMBOF_NODEFAULT 0x00000001
+# define SHMBOF_NOTIFY 0x00000002
+# define SHCMBM_OVERRIDEKEY (WM_USER + 0x193)
+#endif
+
extern bool qt_wince_is_smartphone();//defined in qguifunctions_wce.cpp
extern bool qt_wince_is_pocket_pc(); //defined in qguifunctions_wce.cpp
@@ -204,8 +213,15 @@ static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, i
mbi.dwFlags = flags;
mbi.nToolBarId = toolbarID;
- if (ptrCreateMenuBar(&mbi))
+ if (ptrCreateMenuBar(&mbi)) {
+#ifdef Q_OS_WINCE_WM
+ // Tell the menu bar that we want to override hot key behaviour.
+ LPARAM lparam = MAKELPARAM(SHMBOF_NODEFAULT | SHMBOF_NOTIFY,
+ SHMBOF_NODEFAULT | SHMBOF_NOTIFY);
+ SendMessage(mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_TBACK, lparam);
+#endif
return mbi.hwndMB;
+ }
}
return 0;
}