a modeless dialog in a modal dialog

a modeless dialog in a modal dialog

Post by dindi » Wed, 14 Jun 2006 14:25:34


Hello:

I create a modal CDialog A as the main window, a modeless CDialog B as
member of A.

In OnInitDialog of A:

m_dlgB.Create(IDD_DIALOG1,this);
m_dlgB.ShowWindow(SW_SHOW);


When the app run, the dialog B display in the ppc.
But when I clicked the close button on the top right corner, the dialog
B don't receive any message,
only dialog A recvive OnCancelMode, then OnOK , why ?


Thanks!
 
 
 

a modeless dialog in a modal dialog

Post by Kerstin Pi » Wed, 14 Jun 2006 17:55:55

Hi!

Well, if dialog A is modal, so it is modal, and you can't get any message
through to (non-modal) dialog B, no matter what your class structure is
like.

Just out of curiosity, why did you make a main window a modal dialog?

Regards,

Kerstin


"dindin" < XXXX@XXXXX.COM > wrote in