Advise after close the "main window"

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dragonazul
Posts: 24
Joined: Sun Sep 23, 2007 9:45 pm
Location: Spain

Advise after close the "main window"

Post by Dragonazul »

Hi all,

I have a "simple" problem. My application is not running in fullscreen mode so i have the minimize/maximize/close buttons of the window (The win32 window that create Irrlicht).
If the user push the close window button I need to confirm this action: Close the whole program.

But I can capture this event into the Irrlicht normal events.
Wich is the easily way of get this external event. My actual options:

1 - Use irr::SIrrlichtCreationParameters::WindowId... A lot of work for only one event??
2 - Modify the "CIrrDeviceWin32::run()" so it don´t directly close the window ( if (msg.message == WM_QUIT)

Another easily way for test if the user close the whole application.

Thanks
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Modify CIrrDeviceWin32::run() so that it sends a new event type and only quit if postEventFromUser returns false, then if you have time implement it for the other devices and post it to the tracker as a patch :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Dragonazul
Posts: 24
Joined: Sun Sep 23, 2007 9:45 pm
Location: Spain

Post by Dragonazul »

OK, thanks. I will try and post here the solution altought my linux/mac/... programing level.... :P
Post Reply