sendmessage的问题
我想使用sendmessage往另一个程序中的编辑框中输入内容 模块中
Public Const WM_SETTEXT = 12
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)
窗体中
Dim i As Long
Dim s As String
s = "Hello"
i = SendMessage(asktao_hwnd, WM_SETTEXT, 0, ByVal s)
'asktao_hwnd是在之前获得的游戏窗口的句柄,已经证明有效(使用FlashWindow时能看到效果)
但是执行上述代码时出现错误:
实时错误49
DLL调用约定错误