mIRC Home    About    Download    Register    News    Help

Print Thread
#102532 09/11/04 11:43 PM
W
wakjah
wakjah
W
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,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
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.

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: 194
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 194
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).


Link Copied to Clipboard