MFC is the Best wrote: the 'Close' is only an example.....sorry.....you are right. can you help me more? In what way ? Design ? Code ? I don't know exactly what you intend to do ? so this is highly speculative : If your application needs a password, it should be asked at the beginning, in a modal dialog, upon return of that dialog, if the password is wrong, you have the choice to either continue ( and you need to be able to check whether the password is valid or exists to block most operations with the ON_UPDATE_COMMAND_UI messages for menus and other type of check ) or quit. If you continue running the application, you need a menu item to allow the user to enter the password. Max.