用findwindow找到窗口句柄(如下图),如何用postmessage选择"确定"?不要关闭,要点"确定"啊,-----------------------
|选择框               |
-----------------------
|  ------    ------   |
|  |确定|    |取消 |  |
|  ------    ------   |
-----------------------

解决方案 »

  1.   

    另:postMessage 中的&10 、&12 是什么东东?有没有一个是选择确定的?
      

  2.   

    t = FindWindow("#32770", vbNullString)
    d = FindWindowEx(t, ByVal 0&, "Button", "确定")
      

  3.   

    Private Const BM_CLICK =  &HF5  (表示单击消息)'先用上面的方法找到确定按钮的句柄 dpostmessage d,0,BM_CLICK,0
      

  4.   

    写错了,不好意思。应该是postmessage d,BM_CLICK, 0, 0
      

  5.   

    我要选择Outlook Express框框的"发送"按钮,可按钮有的's'有下划线,不成啊~~~~帮帮我~~http://www.cerholding.com.cn/images/sendmail.jpg程序如下:
    =============
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPrivate Sub Timer1_Timer()'定时器,每1秒检测一次
        frmHwnd = FindWindow(vbNullString, "Outlook Express")
        If frmHwnd <> 0 Then
            FindWindowEx frmHwnd, ByVal 0&, "Button", "发送(&s)"
        End If
    End Sub
    =================
      

  6.   

    to :gdami(糖米) 
     可是它怎么知道我单击哪一个按钮?
      

  7.   

    FindWindowEx frmHwnd, ByVal 0&, "Button", vbnullstring应该是第1个按钮,这么找就行了。