ConsoleApplication/Win32Util.cpp
@@ -61,7 +61,7 @@ string Win32Util::getWindowName(HWND hwnd) { int length = GetWindowTextLength(hwnd); TCHAR getbuf[100]; TCHAR getbuf[1000]; GetWindowText(hwnd, getbuf, length + 1); int iLen = WideCharToMultiByte(CP_ACP, 0, getbuf, -1, NULL, 0, NULL, NULL); //首先计算TCHAR 长度。 char* chRtn = new char[iLen * sizeof(char)]; //定义一个 TCHAR 长度大小的 CHAR 类型。