diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-23 22:47:37 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-11-23 22:47:37 (GMT) |
commit | 277bcf9c8897cf16a858a2e548bb0a20cac617b8 (patch) | |
tree | e07c83ba325b43a7ca5e73bc0fcda4847c6af48e /src/gui | |
parent | 09656c9b57af5bb383d029c62396b536899b28e7 (diff) | |
parent | 47727e76d44302bd870b8fc2bbae71052dcdc27a (diff) | |
download | Qt-277bcf9c8897cf16a858a2e548bb0a20cac617b8.zip Qt-277bcf9c8897cf16a858a2e548bb0a20cac617b8.tar.gz Qt-277bcf9c8897cf16a858a2e548bb0a20cac617b8.tar.bz2 |
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 1dab738..67e2cbb 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -1053,7 +1053,12 @@ const QString qt_reg_winclass(QWidget *w) // register window class if (winclassNames()->contains(cname)) // already registered in our list return cname; +#ifndef Q_WS_WINCE + WNDCLASSEX wc; + wc.cbSize = sizeof(WNDCLASSEX); +#else WNDCLASS wc; +#endif wc.style = style; wc.lpfnWndProc = (WNDPROC)QtWndProc; wc.cbClsExtra = 0; @@ -1062,11 +1067,20 @@ const QString qt_reg_winclass(QWidget *w) // register window class if (icon) { wc.hIcon = (HICON)LoadImage(qWinAppInst(), L"IDI_ICON1", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); #ifndef Q_WS_WINCE - if (!wc.hIcon) + if (wc.hIcon) { + int sw = GetSystemMetrics(SM_CXSMICON); + int sh = GetSystemMetrics(SM_CYSMICON); + wc.hIconSm = (HICON)LoadImage(qWinAppInst(), L"IDI_ICON1", IMAGE_ICON, sw, sh, 0); + } else { wc.hIcon = (HICON)LoadImage(0, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED); + wc.hIconSm = 0; + } #endif } else { wc.hIcon = 0; +#ifndef Q_WS_WINCE + wc.hIconSm = 0; +#endif } wc.hCursor = 0; #ifndef Q_WS_WINCE @@ -1080,7 +1094,11 @@ const QString qt_reg_winclass(QWidget *w) // register window class wc.lpszMenuName = 0; wc.lpszClassName = (wchar_t*)cname.utf16(); +#ifndef Q_WS_WINCE + ATOM atom = RegisterClassEx(&wc); +#else ATOM atom = RegisterClass(&wc); +#endif #ifndef QT_NO_DEBUG if (!atom) |