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);
时间: 2024-10-11 10:58:25