How to correctly pop a modeless dialog from console using MFC

Posted by Vertilka on Stack Overflow See other posts from Stack Overflow or by Vertilka
Published on 2010-03-25T11:50:42Z Indexed on 2010/03/25 11:53 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

I need to create a console application that has a main() function and pop a modeless dialog, so the console can still work in parallel to the modeless dialog (do other work, like communicating with the modeless dialog).

Whatever i tried, i could only pop a modal dialog. (where the console is in hold till the modal dialog close itself).

When switching to modeless dialog using Create() and ShowWindow() the dialog is displayed without its controls and it freeze / block (you can see the hourglass cursor).

1) i tried to pop the modeless dialog from the main() function
2) i tried to pop the modeless dialog from the InitInstance() of a CWinApp derived class

In all cases the modeless dialog freeze / block.

I believe this is a one line solution.

TNX,
Vertilka

© Stack Overflow or respective owner

Related posts about console

Related posts about mfc