GUICtrlCreateDummy
创建虚拟(Dummy)控件.
GUICtrlCreateDummy ( )
返回值
成功:
|
返回控件标识符(控件ID).
|
失败:
|
返回 0.
|
备注
控件可接收由 GUICtrlSendToDummy() 发送的消息.
控件将通知 GUISendToDummy 发送的值可以用 GUICtrlRead() 读取.
相关
GUICtrlRead, GUICtrlSendToDummy, GUICtrlSetData, GUICtrlSetOnEvent
函数示例
#include <GUIConstantsEx.au3>
Example()
Func Example()
GUICreate("GUICtrlCreateDummy", 250, 200, 100, 200)
GUISetBkColor(0x00E0FFFF) ; will change background color
Local $idUser = GUICtrlCreateDummy()
Local $idButton = GUICtrlCreateButton("event", 75, 170, 70, 20)
Local $idCancel = GUICtrlCreateButton("Cancel", 150, 170, 70, 20)
GUISetState(@SW_SHOW)
Local $idMsg
; Loop until the user exits.
Do
$idMsg = GUIGetMsg()
Select
Case $idMsg = $idButton
GUICtrlSendToDummy($idUser)
Case $idMsg = $idCancel
GUICtrlSendToDummy($idUser)
Case $idMsg = $idUser
; special action before closing
; ...
Exit
EndSelect
Until $idMsg = $GUI_EVENT_CLOSE
EndFunc ;==>Example
----------------------------------------
|