tags:

views:

1076

answers:

10

First off, please understand. I searched this and messed with it for weeks. I have finally given up a solo endeavor and decided to ask this lovely community to help.

I wanted to write GUI applications for windows. Reason being I wanted to port my favorite command line applications to have an interface. I though 'Hey this shouldn't be this hard'.

So I Googled for a couple hours and got a good idea of what I needed. I downloaded Qt and installed everything. Next I found a tutorial aimed at using my current IDE (Bloodshed Dev C++) to work with Qt. Everything went to shambles after that.

I am quite confused what to do now. Some people say my IDE is old and I need to change. Some say I have to configure Windows differently. Someone suggested using Visual Studio C++ (or whatever the Microsoft IDE is).

Here is your where I need your advice and help. What should I do/install/upgrade?

Thank you!

+3  A: 

Okay, there are two pieces to this.

The first one is that under Windows, you're going to need a Windows GUI library. You can write to the Windows API in several ways, but the simplest is to use Microsoft's own. That means picking up Visual Studio in some incarnation.

QT, Wx, and otehrs are all utility libraries built on top of the basic Windows API. They're good for portability to other platforms, but they necessarily add some complexity.

For C++, you need a compiler. Again, for Windows, the simplest thing is to use Visual Studio, but there are other compilers available. The most common free one is going to be the GNU compilers. The easy way to get those is with Cygwin, but that is a UNIX-like environment.

I think the conclusion is that for a beginner, you're best off with Visual Studio.

Once you get it, there are many tutorial around on the web and at Microsoft to learn to use it.

Charlie Martin
Libraries on top of the Windows API do not add complexity, but rather abstract it, so that you don't have to worry about it. It's way easier to create windows/buttons/etc. in Qt than it is through Windows API calls.
Thomas
By the way, there are also free versions of visual C++ available for non commercial use
1800 INFORMATION
@Thomas, that's only true if the abstractions don't leak. Most do.
Steve Rowe
@Steve: Qt does a great job of not unintentionally leaking implementation details. The only time it happens is when the user specifically asks for system specific data.
Evan Teran
Sorry voted this down. Some of the libraries mentioned have a cleaner design than the ever changing mess that is the windows apis.
Harald Scheirich
@Harald, you should be sorry. Whether or not QT et al are simpler, you still need to understand the underlying system to use them; having dealt with all of the ones I mentioned in production code, I'm too painfully aware of that. Better a new person learn one first.
Charlie Martin
@Thomas, you're forgetting that Visual Studio *provides* abstractions on top of the Windows APIs.
Charlie Martin
+3  A: 

You have a lot of options and you could use a lot of tools as described by Charlie Martin. I think that if you want the easiest path, you should use wxDev-C++ which is Dev-C++ bundled with the wxWidgets GUI library. After you install it, you can directly develop GUI applications without need for extra configuration. Maybe Dev-c++ is an old IDE, but you already use it and you know it. And wxWidgets is a solid GUI library.

Dani van der Meer
+1  A: 

While possible to use your current IDE and a toolkit like Qt, if you are looking for the path of least resistence, you should go with Visual Studio. You'll find the best documentation and the most support going that route. Check out the Express Edition which is free (as in beer). Then go grab a copy of a good book on the subject like Charles Petzold's Programming Windows. You should be all set.

Steve Rowe
+2  A: 

Visual Studio 2008 + WTL would be a great combination if you're not worried about cross-platform support. Qt looks great, but for a simple app it might be overkill - distributing a Qt app means shipping a bunch of DLLs for example, whereas you have fewer dependencies with WTL.

Just my 2c. I don't want to start any flame wars here. :)

Wikipedia

Brilliant series of WTL articles at The Code Project

Rob
A: 

Dev C++ is no longer under active development (and is a bit naff anyway). If you want an open source IDE which supports Windows GUI development, try Code::Blocks.

anon
A: 

I use Ultimate++ http://ultimatepp.org/ for cross platform C++ GUI development. It also has a complete library of utilities for networking, databases, etc and a really good IDE. It's BSD licensed, so no issues doing what you want with it. It has really good community support as well.

+5  A: 

As of version 4.5 Qt now comes packaged with the official, cross platform Qt IDE QtCreator. Just download and install Qt 4.5 and you get a full featured (libs, IDE, forms designer, resource editor) development environment for free.

http://www.qtsoftware.com/downloads

Functastic
A: 

First off, Dev-C++ is no longer under development and seems to have been abandoned with lots of bugs. Second, IF you want to stick with windows API, check out my little Dialog Template project.

I just added project files for Visual Studio 2008, Code::Blocks & Dev-C++ just to get you moving. Let me know if you need anything else, as I’d be happy to help you along.

NTDLS
A: 

The following assumes that you are targetting a Windows only platform (if you are looking cross-OS - then lots of the other posts cover various options).

You may be quite fortunate in that you already have an application that can be run from the command line. It is entirely possible to work in one of the .Net languages and access your existing application. Any .Net language (C#, VB.Net, managed C++) can be used to very quickly construct a UI and bind UI components and events and then have that call out to your existing application - passing down the necessary command line arguments.

Another option: Managed C++ actually allows you to mix managed (.Net code) and unManaged code (standards compliant C++ - i.e. - your existing applications) in the same projects (even the same files for lots of code). This allows you access to many modern IDE features and the .Net library for anything net new that you want to add. You simply play a bit with some project settings and "it just works" (well - there might be some learning things but it is quite easy).

While I have a full version of Visual Studio - I believe that the free "Express" versions (http://www.microsoft.com/express/product/) are quite capable for many of these tasks.

+1  A: 

Hope this help :
eGUI and eGui
WTL
NovaTK
Ecere Cross Platform GUI Applications
Torjo
Introduction to wxWidgets

lsalamon