Jump to content

[SOLVED ] Win7 / Aero "Basic", headache


argumentum
 Share

Recommended Posts

So I'm coding in win 10, ..every thing looks nice but then I think, what about XP, ...ugly, but I make it pretty again, no problem. Lets check in Win 7 and here is my conundrum.

Win 10, DRM is on, XP is off ( well, non-existant ), so far so good. I decide to make it the "switch" to enable or disable the checkbox in the context menu.

Win 7 ... I try to apply the same logic and:

DRM on:
image.png.d85051f615e6f2ecf07fa20b69bd57e3.png
 

DRM off:
image.png.1ed82405175d0b70ad1e4d616b3145c9.png
 

now, "Windows 7 Basic": DRM is off
image.png.46e64ba0c4ab73521f93906fbb2c8415.png

Question: how should I determine if to hide the check-mark or not?, Is there a way to know that this theme is ? or better yet, how can I know that the theme is classic ?

Thanks
PS: I know that the code is not here but I think that my trend of thought would make it irrelevant anyway.
 

Edited by argumentum
SOLVED

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

got it !
 

#include <APIThemeConstants.au3>
#include <WinAPITheme.au3>
Func IsItAero()
    Local $s, $aData = _WinAPI_GetCurrentThemeName()
    If IsArray($aData) Then
        If _WinAPI_GetThemeDocumentationProperty($aData[0], $SZ_THDOCPROP_CANONICALNAME) = "Aero" Then
            Return True
        Else
            Return False
        EndIf
    EndIf
    Return False
EndFunc   ;==>IsItAero

 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

:imwithstupid:

The better approach is to

TraySetOnEvent($TRAY_EVENT_SECONDARYDOWN, "Tray_ShowContextMenu")
Func Tray_ShowContextMenu()
    Local Enum $e_idEntry = 1001
    Local $hMenu = _GUICtrlMenu_CreatePopup()
    _GUICtrlMenu_AddMenuItem($hMenu, 'My entry', $e_idEntry)
    ... ...

..this way, the context menu is created on the fly and always on par with the current theme :D

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...