Answered by:
C++ (VS2005) How to add a MAIN form dialog to a Win32 Project?

Question
-
Visual Studio 2005 IDE is the current development tool used at my shop.
In Visual Basic and C#, I can create projects extremely easily that have a Main Form when the Visual Studio 2005 Wizard is done for a Windows Application.
Unless I really am NOT seeing it, There doesn't seem to be an easy way to Create a Main Form in C++ for a Win32 Application. The VS2005 Wizard will create an About Form but that's not what is needed for this application. I MUST add objects (Labels, TextBoxes, Buttons, etc.) AT design time NOT runtime.
Please don't tell me to use the About Dialog as the Main Form... that is NOT the proper way to handle this issue... I will eventually need the About Dialog later on.
The "disjointed" menu layout in C++ is extremely annoying... I'm used to adding a menu to the main form and editing it on the SAME form at design time.
I have existing C++ code which is already working in an old project that is needed in a new C++ Project WITH a Main Form dialog.
Converting an OLD C++ project to C# would take too long since the code doesn't convert very well to C#. Creating a DLL, while not out of the question, would take more time that I am allowed for this short term project.
I have tried to use C++ code in a C# program... too many compiler issues then too there are too many inconsistencies when converting the existing code. Don't have time to rewrite the working code then retest everything again... plus it is very very tedious and too time consuming.
At this time, I don't have time to learn how to write a WRAPPER to allow C++ code to be added to a C# program.
Any helpful ideas on how to make a Main Form Dialog using C++ that would let me place objects on it design time would be greatly appreciated.
Thanks,
Bill NewTuesday, December 29, 2009 8:47 PM
Answers
-
Create a new MFC Application. Set the application type to "Dialog based"
- Proposed as answer by Nikita Leontiev Tuesday, December 29, 2009 10:46 PM
- Marked as answer by Nancy Shao Monday, January 4, 2010 4:51 AM
Tuesday, December 29, 2009 8:55 PM -
Create a new MFC Application. Set the application type to "Dialog based"
... or if you want a WinForms application, select CLR - Windows Forms Application.
However, for Windows Forms you are much better to use C#. C++/CLI is primarily intended for wrapping native code into a managed library that can be used from C# (or VB.NET).
David Wilkinson | Visual C++ MVP- Marked as answer by Nancy Shao Monday, January 4, 2010 4:51 AM
Tuesday, December 29, 2009 10:32 PM
All replies
-
Create a new MFC Application. Set the application type to "Dialog based"
- Proposed as answer by Nikita Leontiev Tuesday, December 29, 2009 10:46 PM
- Marked as answer by Nancy Shao Monday, January 4, 2010 4:51 AM
Tuesday, December 29, 2009 8:55 PM -
Create a new MFC Application. Set the application type to "Dialog based"
... or if you want a WinForms application, select CLR - Windows Forms Application.
However, for Windows Forms you are much better to use C#. C++/CLI is primarily intended for wrapping native code into a managed library that can be used from C# (or VB.NET).
David Wilkinson | Visual C++ MVP- Marked as answer by Nancy Shao Monday, January 4, 2010 4:51 AM
Tuesday, December 29, 2009 10:32 PM