请问如何查找某个对话框的句柄,然后对这个对话框的"确认"按钮发消息?
实现自动点击(就是这个对话框一出来就被点没)
希望能够得到相关的源代码,谢谢了另外请关注
http://expert.csdn.net/Expert/topic/1581/1581565.xml?temp=.2340967
实现自动点击(就是这个对话框一出来就被点没)
希望能够得到相关的源代码,谢谢了另外请关注
http://expert.csdn.net/Expert/topic/1581/1581565.xml?temp=.2340967
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const SW_SHOWNORMAL = 1
Const WM_CLOSE = &H10Private Sub Command1_Click()
CloseDialog Text1.Text
End SubPrivate Sub CloseDialog(sDialogTitle As String)
Dim WinWnd As Long, RetVal As Long, lpClassName As String
WinWnd = FindWindow(vbNullString, sDialogTitle)
If WinWnd = 0 Then MsgBox "Couldn't find the window ...": Exit Sub
PostMessage WinWnd, WM_CLOSE, 0&, 0&
End Sub