Jump to content
Sign in to follow this  
Chinasmoker

Read the status 0d control

Recommended Posts

Chinasmoker

CODE
#include <GUIConstants.au3>

GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered

$radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20)

$radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20)

GUICtrlSetState ($radio2, $GUI_CHECKED)

GUISetState () ; will display an dialog box with 1 checkbox

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED

MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.')

Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED

MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.')

EndSelect

Wend

There is a question:

Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED ;abbreviation A

Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED ;abbreviation B

then ,A .B,and "GUICtrlSetState ($radio2, $GUI_CHECKED)" what relation?


One is never too old to learn

Share this post


Link to post
Share on other sites
Chinasmoker

Haha,Have a mistake ,The title sholde be Read the status of control


One is never too old to learn

Share this post


Link to post
Share on other sites
Richard Robertson

First of all, you don't need to type the thread title as the subheading as well. That is just redundant.

Second of all,

then ,A .B,and "GUICtrlSetState ($radio2, $GUI_CHECKED)" what relation?

doesn't make a whole lot of sense.

Share this post


Link to post
Share on other sites
Chinasmoker

sorry,My En is very poor,Thanks for your forgive.

and the meaning of this topic:

code:Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED

code:Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED ;abbreviation B

code:GUICtrlSetState ($radio2, $GUI_CHECKED)

these these sentence,what what relation.

Too many question need to ask,I must study hard


One is never too old to learn

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.