问题
I have 2 dialog and I´m trying to embedded one to another. It is accomplished by setting style of embedded dialog to WS_CHILD. It works correctly, but embedded dialog has wrong (default windows) style. Is it windows thing, that cannot be changed, or is there any way to fix it? I tried to changed all options for both dialogs in resource editor, but none seems to work.
Main dialog is normal modal dialog.
Embedded dialog is created in OnInitDialog()
of main dialog like
CDialog m_dlg1;
m_dlg1.Create(CDialog1::IDD, this);
m_dlg1.SetWindowPos(NULL, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE)
and has Style
set to Child
in Resource editor
.
Result looks like
How I want it to look (it looks like it with popup and overlapped style)
Thanks in advance for any help, or recommendations.
来源:https://stackoverflow.com/questions/44064782/mfc-child-ws-child-dialog-has-different-style-than-parent