Tech Support > Microsoft Windows > Development Resources > How to tell when a dialog box has been rendered?
How to tell when a dialog box has been rendered?
Posted by John on June 27th, 2003


I have a modal dialog box that has to gather some time-consuming
information which it presents in a list control report view.
Right now the information gathering is in OnInitDialog()--this means
that when the user clicks the button which generates the DoModal()
method, there's a long delay during which nothing appears to be
happening (while OnInitDialog() is running).

I want instead to have the dialog box appear as soon as the button is
clicked, _then_ gather the information so the user can see that
something productive is occurring.

But, I can't find a method or WM_ message that will tell me that the
dialog box has been drawn. There are several methods and messages
indicating that the window is _about_ to be drawn, but I can't find
one that indicates is has been drawn.
Can someone suggest a technique that will allow me to do what I have
described above? Thank you.


Similar Posts