Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.3.1 Windows: Detect when system uses "visual styles" from system (i.E. Win7 Aearo)
QtWS25 Last Chance

Qt 5.3.1 Windows: Detect when system uses "visual styles" from system (i.E. Win7 Aearo)

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peter999
    wrote on 10 Jul 2014, 10:51 last edited by
    #1

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on 10 Jul 2014, 15:47 last edited by
      #2

      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

      1 Reply Last reply
      0
      • P Offline
        P Offline
        peter999
        wrote on 10 Jul 2014, 19:13 last edited by
        #3

        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

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on 10 Jul 2014, 20:01 last edited by
          #4

          Have you tried "(HWND)QWidget::winId()":http://qt-project.org/doc/qt-5/qwidget.html#winId ?
          Or
          @
          reinterpret_cast<HWND>(QWidget::winId())
          @

          1 Reply Last reply
          0
          • P Offline
            P Offline
            peter999
            wrote on 11 Jul 2014, 10:29 last edited by
            #5

            Yes, but it does not work, the widgets have all the visual styles

            1 Reply Last reply
            0

            3/5

            10 Jul 2014, 19:13

            • Login

            • Login or register to search.
            3 out of 5
            • First post
              3/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved