mIRC Homepage
Posted By: wakjah Retrieve RichEdit Handle - 09/11/04 11:43 PM
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
Posted By: qwerty Re: Retrieve RichEdit Handle - 10/11/04 09:39 PM
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.
Posted By: Soul_Eater Re: Retrieve RichEdit Handle - 02/12/04 10:24 PM
Feel free to view my source in my Editbox DLL:

http://www.mircscripts.org/comments.php?cid=2357
Posted By: Narusegawa_Naru Re: Retrieve RichEdit Handle - 03/12/04 01:52 PM
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).
© mIRC Discussion Forums