Click here to Skip to main content
13,401,175 members (48,518 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I write a program using c++. I am using visual visual studio 2012.In my program there are many graphical element such as aircrft, radar etc. I have written the program in win32 console application. In my program there are many header (.h) files as well as many (.cpp) files. Now I want to run my program in Graphical User Interface (GUI) by copying those header files and cpp files. what can i do in this situation. please give me a solution by an example.
Posted 20-Jan-13 17:40pm
Updated 20-Jan-13 18:29pm
Sergey Alexandrovich Kryukov 20-Jan-13 23:04pm
The question is too vague to discuss it seriously. We have no idea what your application should do. You managed to even say no word about you platform. And yet, you are still asking this go-there-don't-know-where-bring-that-don't-know-what kind of question. If you didn't understand this little difficulty in first place, I am not sure how to talk with your, about what... See the point?
sultan-2 20-Jan-13 23:32pm
I am using visual studio 2012. My application will able to control aircraft movement, radar specification etc.
Andreas Gieriet 21-Jan-13 13:37pm
When you have a console application, how can you have graphical elements?
Are you asking for how to program some GUI on Windows (.Net)?
Or are you asking how to get some existing *.h/*.cpp into another VisualStudio Solution (--> add existing file).
Your question is far too unspecific.
Please clarify.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Your question is somewhat complex and lacking in a lot of details. Most of the issues you describe can be worked out by following a reasonable book on C++ programming for a Windows operating system (ie. a Visual Studio/C++ book, not Stroustrup's C++ book).

[No url here; refer to a paper book...]
valery possoz 21-Jan-13 16:17pm
A good book is always a good start :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Spend some time studying Windows programming[^] and Windows GDI+[^] for details of how to draw graphical images in Windows.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

I think there're only few ways of doing so...

Going Native
Build everything from scratch (well.., not at all). These are the Fastest GUIs around. A platform always have a this kind of API set (one & only). In Windows it's Win32 API. I've heard that in Mac it's Cocoa API. These are :
>> OS dependent.

Wrappers around a specific Platform
2nd level. This is a framework, that is used only to minimize the code of the Native API, or to make it more simpler. There're may be a tiny performance difference between the Native and this. (it really doesn't matter sometimes). For Win32, there're frameworks called MFC, WTL ,... (you may have probably heard about them). These're
>> OS dependent.

Use cross-platform toolkits (or Frameworks)
Completely portable. Slower that the above two ways. But can help you in Rapid Developments. Easy to learn and simple. QT and KDE can be examples. (really, there are).

I always like the 1st way of GUI, which is 'Going Native'. But it's your choice !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180218.2 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100