Click to See Complete Forum and Search --> : Question about correct modal dialog behavior


Cosmic314
August 22nd, 2004, 10:13 PM
I am writing an application on my new system. I create a modal dialog box. During the dialog box's lifetime moving it across the main window erases the client area graphics with no apparent redraw. Closing the modal box does not cause a redraw of the main window. Even if I specifically InvalidateRect followed by UpdateWindow, the program still doesn't redraw. I have to resize the window for a redraw to work.

My questions are:

What is the correct Windows behavior? Should the main window be redrawing correctly by itself?

Thanks,
Tim

Cosmic314
August 22nd, 2004, 10:21 PM
Blah!!!!

Ignore this question. I had a bug deep down in the code. :blush:

The correct drawing protocol is for Windows to redraw automagically without a specific need to InvalidateRect() in case anyone was wondering.

Thanks,
Tim