diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-05-07 16:43:12 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-05-07 16:43:12 (GMT) |
commit | 6c067866db65f113237a4c28374317c948da8ba9 (patch) | |
tree | c8920e1ecbd4c6875691f52d5579e7264fb4af0d /src/gui/widgets/qmenu_wince.cpp | |
parent | 61bec93c12bdc2912b38264386af07f80c3c0272 (diff) | |
parent | 90a65aa6611eb33229cdc00ffe6c22012944ba1a (diff) | |
download | Qt-6c067866db65f113237a4c28374317c948da8ba9.zip Qt-6c067866db65f113237a4c28374317c948da8ba9.tar.gz Qt-6c067866db65f113237a4c28374317c948da8ba9.tar.bz2 |
Merge branch '4.5'
Conflicts:
src/gui/painting/qbackingstore.cpp
src/gui/painting/qwindowsurface_raster.cpp
Diffstat (limited to 'src/gui/widgets/qmenu_wince.cpp')
-rw-r--r-- | src/gui/widgets/qmenu_wince.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp index 315bd51..9a7374a 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,13 @@ static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, i mbi.dwFlags = flags; mbi.nToolBarId = toolbarID; - if (ptrCreateMenuBar(&mbi)) + if (ptrCreateMenuBar(&mbi)) { + // 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); return mbi.hwndMB; + } } return 0; } |