I want to make a modeless dialog box that shows itself without being activated.
I tried
m_ReminderDialog = new CReminderDialog();
m_ReminderDialog->Create(CReminderDialog::IDD, GetDesktopWindow());
with the dialog template
IDD_REMINDER DIALOGEX 0, 0, 318, 269
STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_TOPMOST | WS_EX_NOACTIVATE | WS_EX_APPWINDOW
...
But it still comes up activated.
I tried making a window directly, not in MFC and using CreateWindowEx, with
WS_EX_NOACTIVATE | WS_EX_APPWINDOW
That worked. The window comes up inactive, but it can be activated by clicking on the taskbar button.
I read that the call to Create activates the window. Is that true, and if so is there a way to create the modeless dialog box that doesn't override WS_EX_NOACTIVATE?