3

I created a project in c++ that run for hours.

I want to make a simple GUI (For Windows) that will let the user to choose between some inputs,and click on "start". and then, show him a progress bar which represent the percent of the computation that has been done. (and probably a small animation).

  1. What is the best way to do this? I never made a Graphical interface before.

  2. I try to use Visual Studio 2010: In new Project I choose Win32 Project, and I found where i change the menu, but I don't know how to edit the main form. there is a tutorial?

Thanks!

7 Answers 7

5

I heartily recommend Qt.

You might also want to use Qt Creator as your IDE for added convenience, but this is not a requirement.

Sign up to request clarification or add additional context in comments.

Comments

1

What is the best way to do this? I never made a Graphical interface before.

The easiest way is to use the Visual Studio 2010 IDE and create a new WinForms Application templated project.

I try to use Visual Studio 2010: In new Project I choose Win32 Project, and I found where i change the menu, but I don't know how to edit the main form. there is a tutorial?

Microsoft provides tutorials on their websites and you can find many more via Google searches.

3 Comments

For the record this requires managed C++, which may not be what the OP is after...
Be aware that this creates a Managed C++ project, not regular C++. Though it's admittedly much easier to create a GUI that way than with pure Win32 or MFC, it may not be what you want.
@Chris: It's hard to say. The question is a little vague.
1

I believe there are several possibilities. If you are using VS2010, MFC might be one of them. Or you could also use .NET framework to build one. Also, Nokia Qt is another choice. Since you only want a simple GUI, I will suggest .NET framework, which could be easier and it is also together with VS2010.

Comments

0

If you're sure you want to go win32 (raw): you can learn it here: http://www.winprog.org/tutorial/

Otherwise, use something like wxWidgets if you don't want to restrict yourself to windows

2 Comments

I believe the OP specified simple.
@Chris: It's pretty simple if you're running anything above visual studio pro - you can then use the forms designer for API resources. As I said though, wxWidgets is a better alternative
0

If you're using VS2010 Express, you don't have MFC template and all supporting libs (http://msdn.microsoft.com/library/hs24szh9.aspx), but you can get the libs from SDK.

Comments

0

To clear some things up: there isn't a "forms editor" for Win32 C++ projects, you have to code the GUI by hand using Win32 methods. The people here have suggested using .NET to design the GUI using the Visual Studio Designer. This will work, but you'd either need to drive your C++ executable using the .NET GUI, or turn your C++ code into a class library that you can use in the GUI.

3 Comments

No - If you've got anything above visual studio express, you can use the forms designer (albeit a more restricted version) for win32 c++ projects
Do you mean the resource designer? It's not really a true "editor", just creates the resource scripts for you. The .NET forms editor does all the C# code-behind generation for you.
Yeah that's the one, It's just that you said 'code the GUI by hand using Win32 methods'. Which isn't entirely true. But yes, you do have to code all the message-handling by hand
0

If you use .net It's like a different language; more confusing and slow with GC :/. Qt is mature, very well documented and easily cross-platform. Qt-creator is also very easy to use and not as heavy as VS. Qt can be used for free commercial under the lgpl license.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.