各位好!
    我现想通过SendMessageW(
    __in HWND hWnd,
    __in UINT Msg,
    __in WPARAM wParam,
    __in LPARAM lParam);函数发送消息来实现模拟鼠标左键按下的动作,但是link控件的Msg是什么?请各位大侠帮帮忙!

解决方案 »

  1.   


    发送消息WM_LBUTTONDOWN 和 WM_LBUTTONUP给对话框,lParam包含link控件坐标.
    The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area. The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area. 
      

  2.   

    不好意思能不能举个例子!这样我不太明白!thank you!
      

  3.   

    这个不好使,不如用mouse_event,send_input,..
      

  4.   

    SendMessageW 需要知道接收消息的窗口句柄,要获得句柄要枚举窗口。mouse_event 则是从系统级上来操作,只需要输入屏幕绝对坐标位置,就可以了,麻烦则是你需要事先知道被点击的控件在屏幕什么地方。