Thursday, July 9, 2009

Is there a graphic side to C++? I want a GUI but i dnt know where to start.?

Not too sure what environment you're using. If you want GUI stuff, I'd recommend you use Visual Studio VC++ or VS VC++ express. I know it's a MS product; however, building GUI and graphics programs are much simpler.





First step would be to practice with the Windows standard GDI. Rolling programs with GDI calls will enable your program to run on any Windows box. When you get comfortable, you can opt for direct x or open gl.





If you already have VC, start a MFC dialog or document project. This will generate at least 5 different files. Don't edit, just build and run--you should see the standard template. To generate further controls, go to the resource view and open the dialog or document. You'll be able to drag and drop buttons, list boxes, etc. These are called "controls."





For further descriptions of each, see web sites like codeguru.com or thecodeproject.com.





Good luck.

Is there a graphic side to C++? I want a GUI but i dnt know where to start.?
Check out QT from trolltech. Free for academic, they want a license fee if you make commercial solutions.
Reply:If you're looking for Windows GUI, then I'd recommend this tutorial:





http://www.winprog.org/tutorial/





It served me well, anyway. Note that this is not graphics in general. It uses the Windows API, which is just general windows applications. If you're looking for graphics-intensive programming, like for games, you'd probably want to check out something else. I haven't used it yet, but this site seems to have information on game programming:





http://www.toymaker.info/index.html
Reply:No. There is an extensible side to C++ so you should have no trouble finding a library which will help you do graphics for the OS and hardware you want to write for, but if you want to do GUI programming, first you have to look for information about your specific graphic user interface.





Since I won't have Microsoft Products in my house any more, if I can avoid it, I shall simply mention OpenGL is widely used -- and cross-platform -- while the X-Windows platform I used is very well served by Kenton Lee's X-Windows resource page which I won't link to because I don't know you would find it useful (you may be one of those who will have Microsoft products in their house whether they can avoid it or not).





Anyhow, C and C++ support many different libraries without including them as part of the standard, and most graphics libraries are of that nature. To do graphics and GUI stuff you need to know about your graphics hardware and GUI. Then you research and presumably download what is available for it.


No comments:

Post a Comment