Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
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
Edited 20-Jan-13 18:29pm
v2
Comments
Sergey Alexandrovich Kryukov at 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 at 20-Jan-13 23:32pm
   
I am using visual studio 2012. My application will able to control aircraft movement, radar specification etc.
Andreas Gieriet at 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
Rate this: bad
good
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...]
  Permalink  
Comments
valery possoz at 21-Jan-13 16:17pm
   
A good book is always a good start :)
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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 !
  Permalink  

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

  Print Answers RSS
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
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