how to create dialogs in Console application
-
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
-
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
I don't get it. If you need dialogs, why don't you create a win32 application instead :doh: ?
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++ -
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
Just as you normally would. What's the specific problem?
Steve
-
I don't get it. If you need dialogs, why don't you create a win32 application instead :doh: ?
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++I already have a console application in which I want to create my dialog. If I tried to create a dialog resource and then add a class to the dialog through class wizard as in MFC it gives me errors due to #define "StdAfx.H" which is included in the new dialog class created through wizard. And also its not able to recogonize the MFC classes.
-
Just as you normally would. What's the specific problem?
Steve
If I tried to create a dialog resource and then add a class to the dialog through class wizard as in MFC it gives me errors due to #define "StdAfx.H" which is included in the new dialog class created through wizard. And also its not able to recogonize the MFC classes and gives errors.
-
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
I don't think Visual Studio is set up to do this. If you want to use MFC then you should either create an MFC Windows app that contains the dialogs, or an MFC dialog app with tabs or some similar mechanism. If you want to add dialogs to a console app then you will need to do it manually, by adding all the required Win32/MFC framework components.
It's time for a new signature.
-
If I tried to create a dialog resource and then add a class to the dialog through class wizard as in MFC it gives me errors due to #define "StdAfx.H" which is included in the new dialog class created through wizard. And also its not able to recogonize the MFC classes and gives errors.
The author of this article attached a console to a MFC CMainFrame using
AllocConsole()
. Creating a console for your MFC app's debug output Creating a console for your MFC app's debug output -
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
-
I don't get it. If you need dialogs, why don't you create a win32 application instead :doh: ?
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++I believe he wants to mimic the logic of old DOS GUI. :omg:
-
In a console based application, we cant include the dialog which is created by MFC or SDK. If u still need to use the dialog in console application, convert the your console application to win32 application and try to use MFC dialogs. ---Parthi
Parthiban wrote:
In a console based application, we cant include the dialog which is created by MFC or SDK.
Wrong. You could have a console based application support MFC by including the right header files.
“Follow your bliss.” – Joseph Campbell
-
The author of this article attached a console to a MFC CMainFrame using
AllocConsole()
. Creating a console for your MFC app's debug output Creating a console for your MFC app's debug outputWhich is the opposite of what the OP wanted, yes?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Which is the opposite of what the OP wanted, yes?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
Im wrong.
-
If I tried to create a dialog resource and then add a class to the dialog through class wizard as in MFC it gives me errors due to #define "StdAfx.H" which is included in the new dialog class created through wizard. And also its not able to recogonize the MFC classes and gives errors.
Post the errors.
Steve
-
Please provide me step by step how to create a number of dialogs in a Console application I also need to respond to the events in the dialogs as in MFC.
Sounds like you didn't create the console application with the MFC app wizard, so the pre-compiled header settings are not set correctly. You also technically need to initialize MFC in main, though this isn't actually required for some parts of MFC (which I used to worry about in the days of very limited memory, but haven't for years.)