弹出外部模式对话框后不能执行后续操作的问题,急!谢谢!!!
'启动EXEIf WinExec(ExeFile, 2) <= 32 Then Exit Sub
Sleep 2000 '延时2秒
'获取主窗口句柄
hwnd = FindWindow(vbNullString, "主窗口标题")
If hwnd = 0 Then Exit Sub
SetActiveWindow hwnd
'获取“Edit”句柄
hcnd = FindWindowEx(FindWindowEx(hwnd, 0, "ComboBox", vbNullString), 0, "Edit", vbNullString)
If hcnd = 0 Then Exit Sub
'输入文件名
SendMessage hcnd, WM_SETTEXT, 0, ByVal TCFile
Sleep 2000
'点击“加载”按钮
hcnd = FindWindowEx(hwnd, 0, "Button", "加载(&M)")
SendMessage hcnd, BM_CLICK, 0, 0
=====以上运行正常,能弹出接收输入的模式对话框,但下面无法取得该对话框的句柄
hcnd = FindWindowEx(hwnd, 0, "#32770", "输入数据")
hcnd输出总是0
请指教!非常感谢!!!
[ 本帖最后由 tender138 于 2014-5-9 11:02 编辑 ]