If the user prefers the edit box to be cleared before he or she types a message, you can attach a function to the Clear Message button to clear the contents. You can add this function through the Class Wizard in the usual way. The functionality is a simple matter of setting the m_str Message variable to an empty string and then updating the controls on the window to reflect this. The code to do this is in Listing 2.5.