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.