OpenQNX :: The QNX Community Portal

Sep 07, 2008 - 07:41 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 38 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
m2asseli
Post subject: Code after a call to PtMainLoop  PostPosted: Aug 30, 2007 - 02:32 PM
Senior Member


Joined: May 11, 2004
Posts: 100

Hello,

I am writing a GUI program and would like to clean-up after the user has closed the main window. I create the main window and widgets, then call the main loop:

int main()
{
...
InitWndAndWidgets();
...
PtMainLoop();

CleanUpCode();

return 1;
}

Code is never executed after PtMainLoop(), i.e. I never get to CleanUpCode(). I am assuming there is some event emitted when the main window is closed, which is captured by PtMainLoop(). Can I attach my own code when this event is captured? Or is there a way to have code executed after a call to PtMainLoop()?

Thanks.
Matt.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
micro
Post subject: RE: Code after a call to PtMainLoop  PostPosted: Aug 30, 2007 - 03:39 PM
Senior Member


Joined: Jul 22, 2004
Posts: 347

You would like to set the Pt_ARG_WINDOW_NOTIFY_FLAGS according to your needs.
Then in the Pt_CB_WINDOW Callback you could check if the window has to be closed and clean up there.

A good topic for this is "Window Management" in "Photon MicroGUI-Programmers Guide"
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.