The first thing that you want to take care of is making sure that the user can close your application. Because you deleted the OK and Cancel buttons and added a new button for closing the application window, you need to place code into the function called by the Exit button to close the window. To do this, follow these steps:
1. Using the Class Wizard, add a function for the ID C_EXIT object on the B N_CLICKED message, as you learned to do yesterday.
2. Click the Edit Code button to take you to the new function that you just added.
3. Enter the code in Listing 2.2.