GUI in C++
Good day ! Need help here :D
How am I going to implement a GUI interface using C++ ?
For example, I wish to show a picture on the left side of the screen if the boolean value is true and on the right side when the boolean is false. How can implement it ?
Do I need to use a class so called MFC ? Is there any other alternative?
I know how to do it using Java but having some serious problem to implement it using C++ :(
What can i do ?
Thanks and have a nice day !
Unlike Java, C++ is for the more seasoned, and innovative programmer. There are sooo many wayz to do that it would take years to exress. In Java you have 1 option - AWT. In C++ you can use any lib you want or any asm anything.
A good begginer way (depending on your compiler) would be to use 13h, or if its a windows compiler, use OpenGL/WinAPI. In C++ you must be somewhat explireienced before you get into graphics... I suggest learning more ANSI C++, and purchasing MSVC++ and Borland C++ before you get into gaphics, once ur into API's, its the funnest thing in the world.
You have a few options for a GUI:
You can use the MFC (Microsoft Foundation Classes), but you need to have Visual C++ to use them properly (Borland C++Builder has some MFC capabilities, not not nearly as much as Microsoft's compiler).
You could also use VCL (Visual Component Library), but you need either Borland C++Builder or Borland Delphi to use VCL. One of the nice things about this is that C++Builder is made to work with components written either in C++ or in Delphi.
Another option is using a free library that is compiler independent. There is a good GUI library written using the OpenGL library that works well, but I don't recall the name right now. I'll try to find it and post it here later.
You're thinking of 'GLUT', thats a begginer's OpenGL Lib, I highely discurage you from using it, becosue it "stunts you're growth as a programmer", I say dive into the real thing:
No, I'm not thinking of GLUT. I'm thinking of a library that is basically a library of visual components for GUI's, and I can't remember the name. It is actually a really good library though.
Gah, GLUT is cool.
A windowing, multi-platform API specifically for OpenGL. No need to learn the huge win32 API just to put some triangles on a screen.
On the other hand, I wouldn't use OpenGL for a GUI.
I finally found that library I was talking about. It is the "GLOW Toolkit". You can find it here: http://www.ugcs.caltech.edu/~dazuma/glow/
There is also a list of various other GUI libraries located at: http://www.free-soft.org/guitool/
I know about that. Still, using glut for a GUI means that whatever platform you write for needs an OpenGL implementation.
Thanks a lot !
Thanks a lot for the advices.
I am looking into them now. If I got any problem, I will approach you all again :)
Thanks again !