Skip navigation.
Home
The QNX Community Portal

View topic - Catching a close event and forcing a close event

Catching a close event and forcing a close event

Isn't the name clear?

Catching a close event and forcing a close event

Postby kenrus » Mon May 02, 2011 10:25 pm

I am developing an application using the Momentics IDE along with PhAB.

When my app launches, it dislpays the main window with a second window on top (the logon window).

What I need to do is two things:

1. When the user successfully logs on, how do I force the logon window to close?

2. Regardless of how the logon window closes, how do I catch the close event?

If the user successfully logs on, then I need to be able to force the logon window to close, catch the close event and enable the main window. (Currently the logon window calls PtBlockAllWindows, I need to call PtUnblockWindows if the logon is successful)

If the user does not successfully logon, then regardless of how they close the window ([X] button, Menu->Close, or a [Quit] button that I added to the interface) I need to catch the close event to make sure the entire application is closed.

I am currently using the Window Manager (Pt_CB_WINDOW) callback and it catches the close event when the [X] button or the Menu->Close options are used. However, it does not catch the [Quit] button that I added which uses the Activate (Pt_CB_ACTIVATE) callback and the Code Type of "Done".

I appreciate any help

Kendall
kenrus
New Member
 
Posts: 9
Joined: Wed Apr 27, 2011 5:38 pm

RE: Catching a close event and forcing a close event

Postby maschoen » Tue May 03, 2011 2:12 pm

I'm fairly sure that there's a library routine that will close the window for you.

I'm surprised that the window close callback doesn't catch the 'Done' callback, but you could alway switch it to a code callback and in that callback cleanup and exit.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron