我想使用API函数(ReadConsoleOutputCharacter)来获得当前屏幕的缓冲区数据, BOOL ReadConsoleOutputCharacter( HANDLE hConsoleOutput, // handle to a console screen buffer LPTSTR lpCharacter, // address of buffer to receive characters DWORD nLength, // number of character cells to read from COORD dwReadCoord, // coordinates of first cell to read from LPDWORD lpNumberOfCharsRead // address of number of cells read from ); 但是,第一个参数该如何设置,好象不是窗口的句柄
::SetForeGroundWindow(hWnd);
BOOL ReadConsoleOutputCharacter(
HANDLE hConsoleOutput,
// handle to a console screen buffer
LPTSTR lpCharacter, // address of buffer to receive characters
DWORD nLength, // number of character cells to read from
COORD dwReadCoord, // coordinates of first cell to read from
LPDWORD lpNumberOfCharsRead
// address of number of cells read from
);
但是,第一个参数该如何设置,好象不是窗口的句柄