Visual Studio: Creating a Simple GUI

I wrote a C ++ application that I created using g ++.

In order to demonstrate this code, I want to create a simple graphical interface for Windows, I thought that creating it using the Visual Studio GUI would be a fairly simple task.

With some stress, I got to the point that I can create and run a C ++ application through the Visual Studio 2010 workspace.

So, I add a new class, I select "Windows Form", it gives me a form that I can drag stuff onto, fine. How the hell am I integrating this?

Can I not just instantiate this class in my main function?

How do I get a form to show at program startup?

I really don’t know where to start, my experience is using C and Java, I don’t have much experience with C ++, and I absolutely do not know about Visual Studio.

All I want is a GUI class for handling user input, and right now it seems incredibly difficult.

Any guidance would be greatly appreciated; I will return to this when my blood pressure returns to a safe level.

+3
source share
3 answers

You walk along it back. You need to call your program from the graphical interface. You cannot create an instance of a "GUI class" from the main one.

, GUI-, . ++, #.

, gui.

+1

, ++, , java gui, . , gui ++, , -
win32 api, mfc, winforms wfp ( .net). . qt, nokia. win32 mfc qt, qt. gui

  • 1. qt ( google)
  • 2. qt. qt- vs [ ] [1]
  • 3. qt visual studio qt ().
  • 4. , . , - , , myLineEdit, -
ui.myLineEdit->setText("Hello world");

Gui . , , .

vics

+3

, , , ++ Visual Studio - ++ dll DLL . ( - COM-, dll COM ).

If your DLL cannot be added this way, you can simply write a binding to it so that you can use it from managed code. Here is an example of how to prepare such a binding: http://www.codeproject.com/KB/mcpp/usingcppdll.aspx

+1
source

Source: https://habr.com/ru/post/1789835/


All Articles