How to use windows forms controls in a visual c++ app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Visual Studio 7 I have a C++ dialogbased MFC application project. When I open the main form of my application the only available tools from the toolbox are those in the "Dialog Editor" section. The components in the "Windows Forms" are all disabled so I can't e.g. add a mainmenu to my project. Why are these components not available when I'm in this mode (in a c# project they are all available) ? How do I add a main menu and panel component to my C++ form ?
 
If you do C++ MFC app, then you do not use anything in .NET Framework's
System.Windows.Forms namespace, which can onlly be used in managed apps.

Jimmy Rasmussen said:
In Visual Studio 7 I have a C++ dialogbased MFC application project. When
I open the main form of my application the only available tools from the
toolbox are those in the "Dialog Editor" section. The components in the
"Windows Forms" are all disabled so I can't e.g. add a mainmenu to my
project. Why are these components not available when I'm in this mode (in a
c# project they are all available) ? How do I add a main menu and panel
component to my C++ form ?
 
You have to start a managed C++ project. You will see them in the new
project wizard. They have "(.NET)" under the name of the type of project.
For example.. "Windows Forms Application (.NET)"

I think this is what you are looking for?

Regards,
Ben S. Stahlhood II

Jimmy Rasmussen said:
In Visual Studio 7 I have a C++ dialogbased MFC application project. When
I open the main form of my application the only available tools from the
toolbox are those in the "Dialog Editor" section. The components in the
"Windows Forms" are all disabled so I can't e.g. add a mainmenu to my
project. Why are these components not available when I'm in this mode (in a
c# project they are all available) ? How do I add a main menu and panel
component to my C++ form ?
 
hmm there is no "Windows Forms Application (.NET)" template available in the
project wizard.
I do have a "Managed c++ application" template, which produces some code for
a console application but not any forms, and adding a dialog as a resource
to this project doesn't solve my problem....
 
If you scroll all the way to the bottom, there is no Windows Form projects?
If not, then you got me. I know I have them...

Regards,
Ben S. Stahlhood II



Jimmy Rasmussen said:
hmm there is no "Windows Forms Application (.NET)" template available in the
project wizard.
I do have a "Managed c++ application" template, which produces some code for
a console application but not any forms, and adding a dialog as a resource
to this project doesn't solve my problem....


"Ben S. Stahlhood II" <ben[.dot.]stahlhood[.at.]intellified[.dot.]com> wrote
in message news:[email protected]...
You have to start a managed C++ project. You will see them in the new
project wizard. They have "(.NET)" under the name of the type of project.
For example.. "Windows Forms Application (.NET)"

I think this is what you are looking for?

Regards,
Ben S. Stahlhood II

When
I open the main form of my application the only available tools from the
toolbox are those in the "Dialog Editor" section. The components in the
"Windows Forms" are all disabled so I can't e.g. add a mainmenu to my
project. Why are these components not available when I'm in this mode
(in
a
c# project they are all available) ? How do I add a main menu and panel
component to my C++ form ?
 
Back
Top