在GUI上创建一个 Dummy 控件。
GUICtrlCreateDummy ( )
参数
无
返回值
| 成功: | 返回控件标识符(控件ID)。 |
| 失败: | 返回值为0。 |
注意
Dummy 这种控件可接收由 GUISendToDummy 发送的消息,它将如常“通知(notify)”,而 GUISendToDummy 发送的值可由 GUICtrlRead 来读取。
相关
GUICtrlSendToDummy, GUICtrlSetOnEvent, GUICtrlRead, GUICtrlSetData
示例
#include <GUIConstants.au3>
GUICreate("GUICtrlCreateDummy",250,200, 100,200)
GUISetBkColor (0x00E0FFFF) ; 改变背景颜色
$user = GUICtrlCreateDummy()
$button = GUICtrlCreateButton ("事件",75,170,70,20)
$cancel = GUICtrlCreateButton ("取消",150,170,70,20)
GUISetState()
Do
$msg = GUIGetMsg ()
Select
Case $msg = $button
GUICtrlSendToDummy($user)
Case $msg = $cancel
GUICtrlSendToDummy($user)
Case $msg = $user
; 可在此添加在关闭窗口前的特别指令
; ...
exit
EndSelect
Until $msg = $GUI_EVENT_CLOSE