I need to create a windows application in C++ and it has to show just a TaskDialog
(see http://msdn.microsoft.com/en-us/library/windows/desktop/bb760540(v=vs.85).aspx ). The TaskDialog
should show a text passed as parameter to the command line.
I can make a "Win32 Console Application" and call TaskDialog
but then I will see the black windows of the console.
I can make a "Windows Application" and just calling TaskDialog
inside WinMain
, is there any problem with this solution?
Any other idea?
That is the way to implement such an app. There is no problem with it all. Of course you don't create a window explicitly in your code and you don't run a message loop. Just call
TaskDialog
.The main point is that you don't want a console app because, as you have discovered, a console window is shown by default. There are two main subsystems, the console subsystem and the GUI subsystem. The latter is somewhat confusingly named. You are not compelled to show GUI in a GUI subsystem app. It's up to you whether or not you choose to do so. Really the choice comes down to whether or not you want a console. So the subsystems could be better named as console and non-console!