点击(此处)折叠或打开
-
POINT point;
-
if(TRUE == ::GetCursorPos(&point)){ // 获取系统光标位置
-
HWND hWnd = ::WindowFromPoint(point); // 获取光标位置的窗口句柄
- if(hWnd){
-
::SendMessage(hWnd, WM_CHAR, 'a', 1); // 向该窗口写入字符
-
::SendMessage(hWnd, WM_CHAR, 'b', 1);
-
::SendMessage(hWnd, WM_CHAR, 'c', 1);
-
::SendMessage(hWnd, WM_CHAR, 0x0a, 1);
-
}
- }