What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Stop the X button from closing a PlusWnd

[?] Stop the X button from closing a PlusWnd
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
O.P. [?] Stop the X button from closing a PlusWnd
Hello again! :P

Countdown Live is almost ready to rock! Now I need some help again...
As you know, a PlusWnd has a close button in the top right corner. When you click it, it'll close the window. I now want to stop it closing the window and display a confirmation box if the user really wants to close the window without saving the changes first. When the user chooses Yes, it'll close the window. When the user chooses No, the window has to stay open.
Now, how the hell should I do that?! :S

code:
Code for the box
//PlusWnd is the options window. (duh)
//"Language.WndOptions['CloseConfirm']" is a string containing the question.
var result = Interop.Call('User32', 'MessageBoxW', PlusWnd.Handle, Language.WndOptions['CloseConfirm'], 'Countdown Live', 0x42124);
if(result == 6) { //Yes
    //Close window
} else { //No
    //Don't close!!!
}

Thanks in advance! ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-11-2006 09:03 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Stop the X button from closing a PlusWnd - by Matti on 08-11-2006 at 09:03 AM
RE: [?] Stop the X button from closing a PlusWnd - by Mike on 08-11-2006 at 09:07 AM
RE: [?] Stop the X button from closing a PlusWnd - by Ash_ on 08-11-2006 at 09:18 AM
RE: [?] Stop the X button from closing a PlusWnd - by Matti on 08-11-2006 at 01:47 PM
RE: [?] Stop the X button from closing a PlusWnd - by deAd on 08-11-2006 at 02:42 PM
RE: [?] Stop the X button from closing a PlusWnd - by matty on 08-11-2006 at 02:48 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On