LRESULT SendMessage(
UINT message,
WPARAM wParam = 0,
LPARAM lParam = 0
) throw();
static LRESULT SendMessage(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam
)
说明:Sends a message to the window and does not return until the window procedure has processed the message.
即给给定的窗口发送一个消息,直到该窗口响应完该消息号才返回。
BOOL PostMessage(
UINT message,
WPARAM wParam = 0,
LPARAM lParam = 0
) throw();
说明:Places a message in the message queue associated with the thread that created the window.
将该消息放入窗口线程的消息队列后即返回。(不需要等待窗口响应该消息)。
LRESULT SendMessageTimeout(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam,
UINT fuFlags,
UINT uTimeout,
PDWORD_PTR lpdwResult
);
说明:该函数可以指定等待窗口响应消息的时间。