I have an MFC dialog-based application. I have overridden the OnNcPaint method and draw some images in the non-client area of the dialog. It works just fine when, for example, some other window is in front of my dialog and that window is moved off of my dialog. But when my dialog actually gains focus, as when I click on its entry in the taskbar or click directly on my dialog, my OnNcPaint does not get called and instead it draws the default, standard images in the non-client area (i.e. the border, the title bar, etc.). How do I get it to call my overridden OnNcPaint when the dialog gains focus, so that I can assure that my painting occurs instaed of the default painting?

- Roger Garrett