CosmosTunes Posted March 10, 2008 Share Posted March 10, 2008 Hi, i have a problem with the switch to the classic theme. my application have to be used in classic skin otherwise the coordinates of the windows doesnt match. 1) Is it possible to read which is the actually theme? 2) my short script below doesnt work. it should switch to classic and load another autoit script but the new script is also winXP theme and not classic anyone can help me? DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) Run("Sequence.exe") Link to comment Share on other sites More sharing options...
rasim Posted March 10, 2008 Share Posted March 10, 2008 (edited) Hi! Quick example:Sequence.exeIf $CmdLine[0] = 0 Then MsgBox(64, "Message", "Used XP theme") Else DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ; turn off XP themes EndIf #include <GuiConstants.au3> GUICreate("My GUI", 300, 200) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Edited March 10, 2008 by rasim Link to comment Share on other sites More sharing options...
rasim Posted March 10, 2008 Share Posted March 10, 2008 1) Is it possible to read which is the actually theme?I`m trying, but unsuccessful $NameStruct = DllStructCreate("wchar") DllStructSetData($NameStruct, 1, 255) $GetTheme = DllCall("uxtheme.dll", "int", "GetCurrentThemeName", "ptr", DllStructGetPtr($NameStruct), "int", 255, "ptr", 0, "int", 255, "ptr", 0, "int", 255) MsgBox(0, "", DllStructGetData($NameStruct, 1)) Link to comment Share on other sites More sharing options...
CosmosTunes Posted March 10, 2008 Author Share Posted March 10, 2008 (edited) ok that works thanks. but i have the problem that i have to switch the window to classic theme from an third party window. isnt it possible to switch complete to classic theme like when u do yourself. otherwise if i know the skin name i can say ... ok xpskin -> y + 5 ; alienware skin -> y + 8... Edited March 10, 2008 by CosmosTunes Link to comment Share on other sites More sharing options...
CosmosTunes Posted March 11, 2008 Author Share Posted March 11, 2008 no one knows an solution? Link to comment Share on other sites More sharing options...
rasim Posted March 26, 2008 Share Posted March 26, 2008 (edited) Is it possible to read which is the actually theme?I know my answer is late, but mayb this need whomever: $Struct = DllStructCreate("wchar File[255];wchar Color[255];wchar Size[255]") $GetTheme = DllCall("UxTheme.dll", "int", "GetCurrentThemeName", "ptr", DllStructGetPtr($Struct, "File"), "int", 255, "ptr", DllStructGetPtr($Struct, "Color"), "int", 255, "ptr", DllStructGetPtr($Struct, "Size"), "int", 255) If DllStructGetData($Struct, 1) = "" Then MsgBox(64, "Message", "Current theme is classic") Exit EndIf MsgBox(64, "Message", "Theme file: " & DllStructGetData($Struct, 1) & @LF & @LF & _ "Color scheme: " & DllStructGetData($Struct, 2) & @LF & @LF & _ "Font size: " & DllStructGetData($Struct, 3)) Edited March 26, 2008 by rasim Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now