E-Mail:

Dialog Boxes (Messenger Plus Scripting)

I’m not sure how many of you out there actually script using Messenger Plus, but if you ever attempt to try and create a modal dialog box, you would find that it is not easy to do natively. A modal dialog box for those who don’t know, is a dialog that a window will create and while that dialog is open, the user can not click the main window until they close the dialog box. For example, if you use Firefox and click Tools > Options, you can not click in the Firefox main window until you close the options dialog box.

In order to kindof duplicate the behaviour using messenger plus’s skinned windows is to create a window as usual making it look like a dialog. Disable your main window using the function “EnableWindow” and then when the user closes the dialog use the function “EnableWindow” again to allow clicks and focus to the main window. Now when you enable the main window back, it puts itself behind another window, which a simple function of “SetActiveWindow” can fix.

Beware, it is possible to place the main window on top of that dialog and if that occurs, there is no way you are going to get control back because a disabled window does not get any messages. To prevent this from happened, make sure you set your dialog always on top. The function “SetWindowPos” can achieve this for you.

Uncategorized - Sep 23, 2008

Dialog Boxes (Messenger Plus Scripting)

Uncategorized - Jul 31, 2008

Why I don’t like dining at the table with the family

Uncategorized - Jan 26, 2008

Interesting free clean-up utilities

Interesting Ideas… Categories

56 queries / 6.266 seconds.