Qt 5.3.1 Windows: Detect when system uses "visual styles" from system (i.E. Win7 Aearo)
-
wrote on 10 Jul 2014, 10:51 last edited by
How can I detect, if my application runs under Windows Classic (Windows NT style) or "visual styles" like Windows 7 base, Win 7 Aero, Win 8 ?
Thank you for your help (I hope so)
Regards,
Peter -
wrote on 10 Jul 2014, 15:47 last edited by
I don't think that "Qt Windows Extras":http://qt-project.org/doc/qt-5/qtwinextras-index.html module supports such functionality.
I guess that you have to use "Windows API to detect an active visual style":http://msdn.microsoft.com/en-us/library/windows/desktop/dd373487.aspx
-
wrote on 10 Jul 2014, 19:13 last edited by
In version 4 there was a HWND, in version 5, it is missing. To switch Visual Styles off, SetWindowTheme(hwnd, L" ", L" "); should work, but I get no HWND (first parameter)...
Regards,
Peter -
wrote on 10 Jul 2014, 20:01 last edited by
Have you tried "(HWND)QWidget::winId()":http://qt-project.org/doc/qt-5/qwidget.html#winId ?
Or
@
reinterpret_cast<HWND>(QWidget::winId())
@ -
wrote on 11 Jul 2014, 10:29 last edited by
Yes, but it does not work, the widgets have all the visual styles
3/5