If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Although SetWindowPos has been called in order to place the new dialog behind the main dialog, it's still shown on top.
Also, a user action like clicking in the main dialog does not change this.
What can be done to overcome this issue?

A: If call CDialog::Create ignoring the second parameter, which is default NULL, the main application's window becomes its owner. Every ovned window stays always on top of its owner and there is no chance to move it behind.
To create a top-level modeless dialog that can stay behind application main window, pass a pointer to desktop window in second parameter of CDialog::Create: