|
The SendMessage function sends the specified message to a window or windows.
The function 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, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
WM_KEYDOWN
nVirtKey = (int) wParam; // virtual-key code
lKeyData = lParam; // key data
nVirtKey
Value of wParam. Specifies the virtual-key code of the nonsystem key.
nlKeyData
Value of lParam. Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag.
김원창 님이 쓰신 글 :
: vb에서는 sendkey를 이용하여 다른 프로그램을 제어합니다. 이를 c++빌더에서 구현하는 방법을 아시는 분 부탁합니다
|