Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Forcing and Catching a close event: Page 1 of 4 (4 Items)
   
Forcing and Catching a close event  
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