diff options
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index b373267fcb..6995f9bbab 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -48,6 +48,7 @@ #include "qmutex.h" #include <private/qthread_p.h> #endif +#include "qtextstream.h" #include <ctype.h> #include <qt_windows.h> @@ -63,8 +64,6 @@ using namespace Microsoft::WRL::Wrappers; QT_BEGIN_NAMESPACE -int appCmdShow = 0; - Q_CORE_EXPORT QString qAppFileName() // get application file name { /* @@ -174,16 +173,12 @@ Q_CORE_EXPORT HINSTANCE qWinAppPrevInst() // get Windows prev app Q_CORE_EXPORT int qWinAppCmdShow() // get main window show command { -#if defined(Q_OS_WINCE) - return appCmdShow; -#else STARTUPINFO startupInfo; GetStartupInfo(&startupInfo); return (startupInfo.dwFlags & STARTF_USESHOWWINDOW) ? startupInfo.wShowWindow : SW_SHOWDEFAULT; -#endif } #endif @@ -480,6 +475,7 @@ static const char *findWMstr(uint msg) { 0x02DD, "WM_TABLET_FIRST + 29" }, { 0x02DE, "WM_TABLET_FIRST + 30" }, { 0x02DF, "WM_TABLET_LAST" }, + { 0x02E0, "WM_DPICHANGED" }, { 0x0300, "WM_CUT" }, { 0x0301, "WM_COPY" }, { 0x0302, "WM_PASTE" }, @@ -765,6 +761,13 @@ QString decodeMSG(const MSG& msg) case WM_DESTROY: parameters = QLatin1String("Destroy hwnd ") + hwndS; break; + case 0x02E0u: { // WM_DPICHANGED + auto rect = reinterpret_cast<const RECT *>(lParam); + QTextStream(¶meters) << "DPI: " << HIWORD(wParam) << ',' + << LOWORD(wParam) << ' ' << (rect->right - rect->left) << 'x' + << (rect->bottom - rect->top) << Qt::forcesign << rect->left << rect->top; + } + break; case WM_IME_NOTIFY: { parameters = QLatin1String("Command("); |