views:

58

answers:

2

I would like to write a simple program in c++. After the program is done i would like to get my answers in form of a graph or picture that would give some certain information if i click on a certain area. i have only written console apllications in c++ before and don't really have a clue where to start with the graphic part of it all.

Can I write the first part of the program in console mode and some how run it under the WIN32 later? for ex what will happen to the cout<<"foo"; commands?

Is there a simpler approach to do some very basic graphic programming.

EDIT: To summarize my most important question would be can I run a console app inside the WINAPI? (to minimize the use of graphic programming code.)

+1  A: 

If you want to learn how to program the basics of windows and you are just starting off, it's going to be almost impossible to learn it just by rote.

My suggestion is to buy a copy of the classic Programming Windows and program along with it.

Dave Markle
Thanks I think I would manage by looking at the tutorials in msdn since I have a very simple program and have used a bit of wxwidgets earlier. However I would just like to write the main program code in console mode.. is it possible to have a console "inside" the windows application?
mrbuxley
+1  A: 

Yes, you can make an application which will have both windows and a console.

See AllocConsole() API, http://msdn.microsoft.com/en-us/library/ms681944(v=VS.85).aspx

If you don't have a console, std::cout will go nowhere.

Pavel Radzivilovsky