diff options
author | Geir Vattekar <geir.vattekar@trolltech.com> | 2009-05-15 13:23:00 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@trolltech.com> | 2009-05-15 13:23:00 (GMT) |
commit | fe7040348d82c5e5d302e7ec674fc0e3f68f06e1 (patch) | |
tree | 6b40b8c1e69a044aebd23f7b137d9abb4720b5e8 /src/gui/widgets | |
parent | a830e5f22a42d00b0b92544cfcb56c79b2c3b6cd (diff) | |
parent | 3875cd2b0a81c190939ea2803a2efbe890ae38ec (diff) | |
download | Qt-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.cpp | 18 |
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; } |