Hi,
I've just finished my c++ class (mechanical engineering) and as the final exam we have to create a simple program with graphical user interface and I need some help from you guys.

The task is this: we have to make a simple GUI that can take the diameters of a Shaft/Hole and calculate how they fit together (pressed, smooth fit...).

Now the problem: i could write the code in c++ but i don't know how to create the buttons or the user interface and how to connect the code with those buttons.

I'm using Visual Studio 2010 professional.

P.S Don't get me wrong i'm not asking you to do my work, just some suggestions on where to start or maybe some tutorials or something like that.
Thank you.

P.S If this is the wrong place for this thread feel free to move it or tell me i' ll remove it.

Thanks.

The visual studio offers you the option to create forms. For using them you need to create a new windows form project. In this kind of project you can add your .cpp and .h files. It offers you the possibility to create windows like drawing them. You add it the same way as you add a cpp file (but instead of selecting a new c++ file you select a new Window Form). With the toolbox you can add to your window buttons, checkboxes, ...

Thanks teo236.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.