怎么给没有窗口的程序发送消息?
用SendMessage一定要窗口句柄的?
[解决办法]
BOOL SendMessageCallback(
HWND hWnd, // handle to window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam, // second message parameter
SENDASYNCPROC lpCallBack, // callback function
ULONG_PTR dwData // application-defined value
);
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.
BOOL PostMessage(
HWND hWnd, // handle to destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
[解决办法]
PostThreadMessage()