views:

88

answers:

6

How can you write a C++ program to open a window like this one... alt text

Is it possible or can apps only be ran from the command line?

I'm using the G++ compiler... Do I need something else like visual studio?

Can I do it just by writing code?

A: 

You need to use the Windows api from within C++.

spig
+1  A: 

Search for WinApi Tutorials like this one

there are alot or you can also you the Visual Studio MFC application wizard and create a dialog application

Baget
A: 

microsoft provides aturorial on that:

http://msdn.microsoft.com/en-us/library/bb384843.aspx

sum1stolemyname
+1  A: 

GUI programming requires the use of additional libraries. There is a C++ GUI library supplied by Microsoft for Windows called MFC. There are many other GUI libraries out there.

If you use these GUI libraries, you don't need to run the application from the command line.

Starkey
+2  A: 

You can use Borland C++, Visual C++ they has GUI or wxWindow or GTK library.

jcubic
+5  A: 

Take a look at QT which is a cross-platform framework that easily builds GUIs.

Then check out a QT tutorial, do a google search. Here is one that will get you to "hello world"

Also, you might want to check out Code::Blocks as an IDE. It will use your already installed g++ compiler.

Dennis Miller