HWND hw = ::FindWindow(NULL,"Form1");
HWND hw2 = ::FindWindowEx(hw,NULL,NULL,NULL);int len = ::SendMessage(hw2, WM_GETTEXTLENGTH, 0, 0);
char* buffer = new char[len+1]; int n = ::SendMessage(hw2,WM_GETTEXT,len+1,(LPARAM)buffer); MessageBox(buffer);
本文共 302 字,大约阅读时间需要 1 分钟。
HWND hw = ::FindWindow(NULL,"Form1");
HWND hw2 = ::FindWindowEx(hw,NULL,NULL,NULL);int len = ::SendMessage(hw2, WM_GETTEXTLENGTH, 0, 0);
char* buffer = new char[len+1]; int n = ::SendMessage(hw2,WM_GETTEXT,len+1,(LPARAM)buffer); MessageBox(buffer);
转载于:https://www.cnblogs.com/gin304994/p/6118312.html