Tutorial :GUI Development With C++ In A Windows Environment [closed]



Question:

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?


Solution:1

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


Solution:2

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.


Solution:3

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.


Solution:4

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


Solution:5

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.


Solution:6

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.


Solution:7

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.


Solution:8

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.


Solution:9

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »