You should right-click your dialog class in the class wizard, and then, select "Add Windows Message Handler", once this has been done, in the "Filter for messages available to class" combobox (right bottom of the dialog), select "WINDOW". Now, you have only to select "WM_ERASEBKGND" from the "New Windows messages/events" listbox (left top of the dialog), after that you have to press the Add and Edit button. Hope this helps...