MFC child (WS_CHILD) dialog has different style than parent

Viewed 1020

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

current style

How I want it to look (it looks like it with popup and overlapped style)

wanted style

Thanks in advance for any help, or recommendations.

0 Answers
Related