回覆 1# leenkon
参考http://www.autoitx.com/forum.php ... %3Bfilter%3D2592000
写了一个例子
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <winapi.au3>
#include <Constants.au3>
$Form1 = GUICreate("输入框点击例子", 341, 208, 192, 124)
$Input1 = GUICtrlCreateInput("点击我", 72, 40, 153, 33)
$wProcNew = DllCallbackRegister("_MyWindowProc", "ptr", "hwnd;uint;long;ptr")
$wProcOld = _WinAPI_SetWindowLong(GUICtrlGetHandle($Input1), $GWL_WNDPROC, DllCallbackGetPtr($wProcNew))
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($Form1)
Exit
EndSwitch
WEnd
Func _MyWindowProc($hWnd, $uiMsg, $wParam, $lParam)
Switch $uiMsg
Case $WM_LBUTTONUP
MsgBox(64,"提示","点击成功弹出消息")
EndSwitch
Return _WinAPI_CallWindowProc($wProcOld, $hWnd, $uiMsg, $wParam, $lParam)
EndFunc ;==>_MyWindowProc
|