现做一个程序,调用Flash的可执行文件。现在需要向该程序发送Ctrl+A,Ctrl+F等消息,以控制Flash运行,请问应该如何做,谢谢!

解决方案 »

  1.   

    SendMessage
    This function sends the specified message to a window or windows. SendMessage calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread's message queue and returns immediately. LRESULT SendMessage(
    HWND hWnd, 
    UINT Msg, 
    WPARAM wParam, 
    LPARAM lParam ); 
    Parameters
    hWnd 
    [in] Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows. 
    Msg 
    [in] Specifies the message to be sent. 
    wParam 
    [in] Specifies additional message-specific information. 
    lParam 
    [in] Specifies additional message-specific information.