Jump to content

Read the status 0d control


Chinasmoker
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...