|
-
Aug 17th, 2000, 10:22 AM
#1
Thread Starter
Member
^----- top.
Why would sending these messages mess with the window's scrolling and painting?
-
Aug 17th, 2000, 10:40 AM
#2
Fanatic Member
why not use the GetWindowTextLength and GetWindowText functions! Much simpler
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 17th, 2000, 11:06 AM
#3
Thread Starter
Member
it's in another process
From the Win32 API Documentation for GetWindowText:
To retrieve the text of a control in another process, send a WM_GETTEXT message directly instead of calling GetWindowText.
So I have to use the SendMessage calls instead of GetWindowText.
-
Aug 17th, 2000, 11:08 AM
#4
Fanatic Member
i do it all the time and it works fine in other proccess.
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Aug 17th, 2000, 11:15 AM
#5
Thread Starter
Member
The problem is that I need to retrieve the text from WITHIN the control of the other process... GetWindowText just returns the window title ("AteWindow"), not the actual contents of the RichTextBox control (e.g. "<HTML><BODY>...").
The code I used was:
Code:
Public Function GetText(Window As Long) As String
'Gets any text from a window
Dim Cursor As String, Text As Long
'Text& = SendMessage(Window&, WM_GETTEXTLENGTH, 0&, 0&)
Text = GetWindowTextLength(Window)
Cursor$ = String(Text&, 0&)
'Call SendMessageByString(Window&, WM_GETTEXT, Text& + 1, Cursor$)
Call GetWindowText(Window, Cursor, Text + 1)
GetText$ = Cursor$
End Function
-
Aug 17th, 2000, 11:18 AM
#6
Fanatic Member
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Sep 11th, 2000, 07:02 PM
#7
Thread Starter
Member
Aargh this is still bothering me (and a ton of users who downloaded my program!)!
Can some API guru please tell me why this is happening and how I can remedy it?
--Josh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|