How to correctly pop a modeless dialog from console using MFC
- by Vertilka
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