codemaster is right a hook would be better in this case. I didnt mention it because a hook can not only just crash mirc but can lead to total system stability issues.

No superclassing wont help in this situation. superclassing is the process of creating a new window class based off of an old one. For exmaple you would use the GetClassInfoEx function to get the class info of lets say a BUTTON. replace the window procedure and name (as well as any other options you like) then call RegisterClassEx to register the new class. Once done you can use CreateWindow("YOUR_NEW_CLASS_NAME_HERE",other,args,...);

this is ok for windows that dont exist yet but mirc will still create its windows based off of the class it registered and not yours. If you dont mind maybe a few system crashes or other problems then i would say give the hook a shot just remember to follow the guidlines in the MSDN about returning the values back to other HookProcs.

To codemastr
Since the dialog is owned by the desktop and all dialogs share the same class how would you go about determining if the dialog was indeed opened by mirc and not say the video properties dialog? The only thing i can think of atm would be sending a signal with the dialog title to mirc since your script knows the dialogs title.

I suppose you could examine the process that created the dialog as well and compare it against mirc's process. I think this would be a bit more difficult considering you can have several instances of mirc running.

Last edited by Narusegawa_Naru; 01/10/03 12:00 AM.

Have Fun smile