Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > .NET

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2001, 10:50 AM
neo_coder neo_coder is offline
Junior Member
 
Join Date: Sep 2001
Posts: 26
Default to b-w-d.net

THANKS :-) Very much, this code worked a treat!!! was also hoping that u could help me with this other problem, i wanted to capture the text from the icq chat/message window, i ran this code on icq and it captured the text from the window that had the mouse over it, i was wondering could u modify this code so that the text from each edit on the icq chat window is put into 2 memos in my delphi program?



procedure TPasswords.Timer1Timer(Sender: TObject);
var Point : TPoint;
//handle of the edit
H : LongInt;
//the window EdText
EdText: pchar;
ControlParent,AU: LongInt;
begin
//Get the current cursor position
GetCursorPos(Point);
//get the window at that point
H := WindowFromPoint(Point);

//get 300 char space in the memory
Getmem(EdText,300);
//GetWindowText(h,classe,300);
SendMessage(H, WM_GETTEXT, 300, LongInt(EdText));
//get controls parent
Au := h;
while ControlParent <> 0 do begin
ControlParent := GetParent(AU);
if ControlParent = 0 then begin
ControlParent := AU;
break;
end;
AU := ControlParent;
end;

Memo1.Text := string(EdText);
//free the reserved memory
freemem(EdText);
end;


-----------------------------------------------------------
thanx everyone for all your help, this is an excellent site
and long may its success continue
Reply With Quote
  #2  
Old 11-05-2001, 03:01 PM
b-w-d.net b-w-d.net is offline
Senior Member
 
Join Date: May 2001
Posts: 1,122
Default RE: to b-w-d.net - a kick in the right direction ;)

have a look through some more code snippets etc... and work out the classnames and through that the handles of the boxes. ( the classnames are somtimes different, we hope they are here ).

then get the text by finding the handles through captions/class names rather than mouse positions.

hope this idea helps, ive got to sleep now

see you around, bye!

----------------------------
[http://b-w-d.net]
webmaster@b-w-d.net
[if this helps you please click on Accept]

Anyone who is interested in webbot, general TCP/IP client development or converting C++ code to Delphi code please contact admin@b-w-d.net
currently working on: Yahoo!Chat integration controls
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:54 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.