Click here to Skip to main content
15,886,075 members
Please Sign up or sign in to vote.
1.00/5 (1 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
Updated 20-Jan-13 17:29pm
v2
Comments
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?
—SA
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.
Cheers
Andi

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...]
 
Share this answer
 
Comments
Valery Possoz 21-Jan-13 16:17pm    
A good book is always a good start :)
Spend some time studying Windows programming[^] and Windows GDI+[^] for details of how to draw graphical images in Windows.
 
Share this answer
 
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 !
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900