GUI in C++ visual studio 2005

H

hcvtec

hi everyone

i am new in this and i need some help with how to create a GUI in c++
VS2005.

i have created a c++ win32 project.
I want from this project to run a simple GUI with buttons and textboxes
only.
I added into this project a new windows form and from designer i added
some buttons to it.

But i can't call the GUI i have created from _tWinMain().
The only think i managed to do is call an empty GUI the code
Application::Run(gcnew Form());

how can i call from the _tWinMain() the GUI i have created?


Any suggestions are appreciated,
thank you
 
N

Nash

Hi HCV,
Did you create a dialog in resource with Button and textbox? what do
you mean by windows form? if you have created a dialog in resource then
you need to call the function CreateWindow to display the dialog box.
 
B

Ben Voigt

hi everyone

i am new in this and i need some help with how to create a GUI in c++
VS2005.

i have created a c++ win32 project.
I want from this project to run a simple GUI with buttons and textboxes
only.
I added into this project a new windows form and from designer i added
some buttons to it.

But i can't call the GUI i have created from _tWinMain().
The only think i managed to do is call an empty GUI the code
Application::Run(gcnew Form());

You must #include the header file that contains your custom form class you
built with the designer, then gcnew your form class.
 
B

Ben Voigt

Nash said:
Hi HCV,
Did you create a dialog in resource with Button and textbox? what do
you mean by windows form? if you have created a dialog in resource then
you need to call the function CreateWindow to display the dialog box.

This IS the C++/CLI newsgroup, where people discuss using .NET with C++.
Windows Forms is a major feature of .NET, being replaced by Presentation
Foundation in .NET 3.0.

Also you wouldn't use CreateWindow to display a dialog from a native
resource anyway.... CreateDialog or DialogBox are much better.
 

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