Mike Larson
2003-09-16 18:04:20 UTC
Hello,
I'm working in a plain DLL, not a driver.
I am trying to use the GetWindowText function to get the text in a TextBox
from a VB6 app.
The GetWindowText function in always returning an empty string. Here is the
code:
long _stdcall ReadText (HWND ReadControl, HWND WriteControl)
{
char ReceiveString [40];
GetWindowText(ReadControl, ReceiveString, 40);
SetWindowText(WriteControl, ReceiveString);
SendMessage(WriteControl, WM_KEYUP, 0, 0);
return ((long)ReceiveString [0]);
}
ReadControlis the hWnd value from the VB6 app of the TextBox to read,
WriteControl is the textbox to copy to.
Am I using it correctly? Is there another function I should be using.
I'm returning the first character just to see what if anything is being
read.
Thanks for any help.
Mike
I'm working in a plain DLL, not a driver.
I am trying to use the GetWindowText function to get the text in a TextBox
from a VB6 app.
The GetWindowText function in always returning an empty string. Here is the
code:
long _stdcall ReadText (HWND ReadControl, HWND WriteControl)
{
char ReceiveString [40];
GetWindowText(ReadControl, ReceiveString, 40);
SetWindowText(WriteControl, ReceiveString);
SendMessage(WriteControl, WM_KEYUP, 0, 0);
return ((long)ReceiveString [0]);
}
ReadControlis the hWnd value from the VB6 app of the TextBox to read,
WriteControl is the textbox to copy to.
Am I using it correctly? Is there another function I should be using.
I'm returning the first character just to see what if anything is being
read.
Thanks for any help.
Mike