duanyongli 发表于 2015-3-17 20:13:38

按钮的快捷键失效了,按Alt+Y和Alt+N无效,求解![已解决]

本帖最后由 duanyongli 于 2015-3-18 02:49 编辑

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$GUI1=GUICreate("$GUI1",200,150,-1,-1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState()
$GUI2=GUICreate("$GUI2",200,100,0,30,$WS_CHILD,$WS_EX_ACCEPTFILES,$GUI1)
GUICtrlCreateButton("OK(&Y)", 20, 10, 70)
GUICtrlSetOnEvent(-1, "_Exit")
GUICtrlCreateButton("NO(&N)", 110,10,70)
GUICtrlSetOnEvent(-1, "_Exit")
GUICtrlCreateInput('',20,60,160)
GUICtrlSetState ( -1, $GUI_DROPACCEPTED)
GUISetState()
While 1
        Sleep(10)
WEnd
Func _Exit()
        Exit
EndFunc

afan 发表于 2015-3-17 22:41:14

可能是 $WS_CHILD 样式不支持
页: [1]
查看完整版本: 按钮的快捷键失效了,按Alt+Y和Alt+N无效,求解![已解决]