minimizing a CDialog

I'm trying to minimize a CDialog by doing this:

CTtDlg dlg;
dlg.Create( IDD_TT_DIALOG );
dlg.ModifyStyle( 0, WS_MINIMIZE );

It compiles and runs without error but the dialog box isn't minimized.
What can I do ?
__Julien__Asked:
Who is Participating?
 
akalmaniCommented:
Replace this dlg.ModifyStyle( 0, WS_MINIMIZE );
with dlg.ShowWindow(SW_MINIMIZE);
0
 
AlexFMCommented:
Try
dlg.ShowWindow( SW_SHOWMINIMIZED  );
0
 
AlexFMCommented:
Sorry, I am late.
0
 
akalmaniCommented:
No worries AlexFM there was a typo from myside too...its SW_SHOWMINIMIZED...not SW_MINIMIZE
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.