Grosminet Posted December 1, 2015 Posted December 1, 2015 Hi,Just one small remark about the help file example "_WinAPI_GetThemeAppProperties.au3" : I think that to appreciate the theme influence on the GUI design, we can mix the Theme's flags during the GUI creation . According this MSN link : SetThemeAppProperties , one "sendMessage:WM_THEMECHANGED" is mandatory to activate any change !This allow to discover:that the GUICtrlSetColor works well without Theme activation (all flags set to 0), but not with an Aero Theme (this is probably normal, but strange for me, because the color should be applied to the text (like the font size and its name), and not to the control design ?!? ...) -> please, have a look to the first "Group" (color blu OK) and to the second "Group" (color red notok).that we can mix different control design in the same GUI.Here is the help example file modified . Thanks, Alain.expandcollapse popup#include <APIThemeConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPITheme.au3> #include <SendMessage.au3> #include <WindowsConstants.au3> Local $iTheme = _WinAPI_GetThemeAppProperties() Local $hForm = GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), 310, 360) _WinAPI_SetThemeAppProperties(0) _SendMessage($hForm, $WM_THEMECHANGED) GUISetFont(8.5, 400, 0, 'MS Shell Dlg', $hForm) GUICtrlCreateGroup('Group', 10, 10, 140, 95) GUICtrlSetColor(-1,0x0000FF) ; Please check the color ! GUICtrlCreateCheckbox('Check1', 22, 26, 120, 23) GUICtrlCreateCheckbox('Check2', 22, 49, 120, 23) _WinAPI_SetThemeAppProperties(BitOr($STAP_ALLOW_NONCLIENT, $STAP_ALLOW_CONTROLS)) _SendMessage($hForm, $WM_THEMECHANGED) GUICtrlCreateCheckbox('Check3', 22, 72, 120, 23) GUICtrlCreateGroup('Group', 160, 10, 140, 95) GUICtrlSetColor(-1,0xFF0000) ; Please check this color ! GUICtrlCreateRadio('Radio1', 172, 26, 120, 23) GUICtrlCreateRadio('Radio2', 172, 49, 120, 23) _WinAPI_SetThemeAppProperties(0) _SendMessage($hForm, $WM_THEMECHANGED) GUICtrlCreateRadio('Radio3', 172, 72, 120, 23) GUICtrlCreateButton('OK 1', 70, 330, 70, 23) _WinAPI_SetThemeAppProperties(BitOr($STAP_ALLOW_NONCLIENT, $STAP_ALLOW_CONTROLS)) _SendMessage($hForm, $WM_THEMECHANGED) GUICtrlCreateButton('OK 2', 180, 330, 70, 23) GUICtrlCreateTab(10, 118, 292, 206) GUICtrlCreateTabItem('Tab1') _WinAPI_SetThemeAppProperties(0) _SendMessage($hForm, $WM_THEMECHANGED) GUICtrlCreateTabItem('Tab2') GUICtrlCreateTabItem('') _WinAPI_SetThemeAppProperties($iTheme) _SendMessage($hForm, $WM_THEMECHANGED) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSETests done with:Autoit 3.3.14.2Windows 7 Home Premium Service Pack 1Computer ASUS N56VScreen resolution: 1920x1080 (recommended)Theme :Windows Classic, AeroTheme Windows 7.
Kovacic Posted December 2, 2015 Posted December 2, 2015 or try this... DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) C0d3 is P0etry( ͡° ͜ʖ ͡°)
Grosminet Posted December 4, 2015 Author Posted December 4, 2015 @Kovacic, equivalent to the library "WinAPITheme.au3" with flags=0; #FUNCTION# ==================================================================================================================== ; Author.........: Yashied ; Modified.......: jpm ; =============================================================================================================================== Func _WinAPI_SetThemeAppProperties($iFlags) DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'dword', $iFlags) If @error Then Return SetError(@error, @extended, 0) Return 1 EndFunc ;==>_WinAPI_SetThemeAppPropertiesA.
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