mIRC Home    About    Download    Register    News    Help

Print Thread
#102532 09/11/04 11:43 PM
Joined: Nov 2004
Posts: 1
W
wakjah Offline OP
Mostly harmless
OP Offline
Mostly harmless
W
Joined: Nov 2004
Posts: 1
Hi, first post smile

I need a reliable way to retrieve the handle of the RichEdit box in a chan window. I was using passing $window($chan).hwnd to my dll and then using the FindWindowEx API to get the hwnd of the child RichEdit by its classname, but it appears that this classname varies from system to system, especially between operating systems.

Any help is muchly appreciated
Thanks
wakjah

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
My knowledge of Windows programming is limited, but it looks like you can use EnumChildWindows to loop through all child windows, calling GetClassName for each child and checking if the text "RichEdit" is contained in the string that holds the class name.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2003
Posts: 187
S
Vogon poet
Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
Feel free to view my source in my Editbox DLL:

http://www.mircscripts.org/comments.php?cid=2357

Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
You could enum the child windows as Qwerty said or use GetDlgItem (look for the edits id in spy). Note however that khaled can change the edits id in a new build wich would break your code (requireing a new version).


Have Fun smile

Link Copied to Clipboard