I added a modeless dialog in my project. But I found the dialog window covered top of the main frame window, so that I cannot use alt+tab to switch to show the main window. I tried to add codes in CMyDialog::PreCreateWindow like below:

cs.dwExStyle &= ~WS_EX_TOPMOST;

But it didn't work. could anyone know how to fix that? thanks!