创建上下箭头按钮(UpDown)控件.
GUICtrlCreateUpdown ( 控件ID [,样式] )
控件ID | 将创建 Updown 的合作控件ID. |
样式 | [可选参数] 控件的样式. 查看附录 GUI 控件样式表. 默认样式 (-1) : $UDS_ALIGNRIGHT. 强制样式 : $UDS_SETBUDDYINT and $UDS_ALIGNRIGHT (如果不定义对齐). |
成功: | 返回控件标识符(控件ID). |
失败: | 返回 0. |
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local
$title,
$input,
$msg
$title = "我的上下箭头 GUI"
GUICreate($title, -1,
-1, -1, -1,
$WS_SIZEBOX)
$input = GUICtrlCreateInput("2", 10, 10, 50, 20)
GUICtrlCreateUpdown($input)
;
尝试调整输入控件
GUICtrlSetPos($input, 10, 10, 100, 40)
GUISetState()
; 运行 GUI, 直到
GUI 被关闭
While
1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
MsgBox(0, 0, "上下调整:
" & GUICtrlRead($input))
EndFunc ;==>Example
provider with jb51.net (unicode) |