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

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 ?
 
N

Norman Yuan

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 ?
 
B

Ben S. Stahlhood II

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 ?
 
J

Jimmy Rasmussen

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....
 
B

Ben S. Stahlhood II

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top