Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HWND hwnd = (HWND)0x00310E3A;
- char szBuf[2048];
- LONG lResult;
- lResult = SendMessage( hwnd, WM_GETTEXT, sizeof( szBuf ) / sizeof( szBuf[0] ), (LPARAM)szBuf );
- printf( "Copied %d characters. Contents: %sn", lResult, szBuf );
- ...
- EnumWindows((WNDENUMPROC)on_enumwindow_cb, 0);
- ...
- BOOL CALLBACK on_enumwindow_cb(HWND hwndWindow, LPARAM lParam) {
- TCHAR wsTitle[2048];
- LRESULT result;
- result = SendMessage(hwndWindow, WM_GETTEXT, (WPARAM) 2048, (LPARAM) wsTitle);
- ...
- hwndEdit = FindWindowEx(hwndWindow, NULL, L"RichEdit20W", NULL);
- result = SendMessage(hwndEdit, WM_GETTEXT, (WPARAM) 4096, (LPARAM) wsText);
- Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
- Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
- Dim MyStr As String
- MyStr = String(GetWindowTextLength(TextBoxHandle) + 1, Chr$(0))
- GetWindowText TextBoxHandle, MyStr, Len(MyStr)
- MsgBox MyStr
Add Comment
Please, Sign In to add comment