Quote Originally Posted by ProgramArtist View Post
I tried to tell you a more general answer. You can call GetClientRect and other window (in Win32 terms) relevant functions after a window (with a handle) has been created.

CDialog derived objects can be used either modal or modeless.
MSDN has got an article about here.
I recommend you to follow the link "Life cycle of a Dialog Box (MFC)" too.

DoModal encapsulates the creation of all the windows and controls, the showing, the updating, the closing of the dialog box. That's why "inside" DoModal all windows/controls are present with a valid handle.
If you use a modeless dialog (which means that you do not call DoModal) then you have to create the dialog first.

With regards
Programartist
Thanks, I finally got it