How to know when player click on close icon??

Blitz3D Forums/Blitz3D Programming/How to know when player click on close icon??

Pinete(Posted 2007) [#1]
Hi all,
There exist some way to know if the player has clicked on the exit icon of the game window?
I would like to do a fade after the player clicks on this icon and after that, launch a new window with a message.
Right now, when player press on exit icon the game just quit and I don't know of to do this from Blitz...

Could you please point me in the right direction?

Thanks in advance!

All the best.


b32(Posted 2007) [#2]
You can use GetMessage/PeekMessage to read out what message was/is sent to the window. For this example, you need user32.decls declarations that are in the commented lines at the start of the code:

You could also use BlitzClose.dll, from here:
http://www.blitzbasic.com/Community/posts.php?topic=44032


Pinete(Posted 2007) [#3]
Impressive!!!
Thanks a lot b32! Thanks!!
:)
I'm very grateful.



All the best!