|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
From console to GUI apps
Hello. I've been wanting to develop some appilactions in either C++ or Java for a while, but I've been only taught about console applications and most programming techniques like arrays, lists, queues, etc,etc...
I would like to start doing more graphic stuff, but I'm completely lost and most googling hasn't led me anywhere. What I'm asking for is some kind of kickstart, or pointers to where to begin learning about GUIs made in C++ along with some questions: - How are interfaces designed in C++? I've got some experience with Visual Basic but I don't know if they are also created via Drag&Drop, or basic code... - How is the OOP applied to such an interface? wouldn't that make it more event-driven and procedural? - What are the most preferred development environments? if possible, I'd like to know if there's any that's relatively good while staying free. - And back onto the topic: where can I start researching GUIs? my ultimate goal is to design a game of sorts, although usual applications are also in my line of sight. If possible, I'd like to know if there's a good comprehensive guide for this, or (not preferably) even a book that I can use. I would appreciate if you answered myquestions as dumbed down as possible; I feel really lost, as most of what I know are loose ends that need to be tied together. Thanks in advance to everyone who aids me ![]() |
|
#2
|
||||
|
||||
|
I've used wxWidgets. I prefer it to FLTK. I've never used GTK.
Event driven doesn't mean non-OOP. If your lawnmower begins to stall out, the governor-vane event adjusts a member of the carburetor object. |
|
#3
|
|||
|
|||
|
if you really want a good GUI language, i suggest c#.
it uses .net and has an excellent IDE (visual studio 2005 express is downloadable and free), and c# is very supported as far as video tutorials from professionals go. Plus, if you know C/C++, you pretty much know C#. |
|
#4
|
||||
|
||||
|
I would suggest trying to make gui apps in Java, since you already have experience. In C++ it is about the biggest pain you could imagine to create even a window. With java, you have the swing package, and it is much eaiser to create a window, and add components and such to it. There are plenty of tutorials and examples on the net as well, and im sure you would have no trouble figuring out how to atleast create a window. Then when you figure out how the components work, you could use a Java GUI builder, to build more complex windows, and it will give you the java code.
Now in C++ and Win32 GUI, its pretty much copy and paste initially, you will probably find a big block of C++ code on the net, that says thats how to create a window, if I remember correctly its just about 100 lines long... there are more than one way, but most of what you will find will be around 100 lines. There are gui builders, but everything is so complex, and then theres no layout managers or anything [like java has], to realign the interface as its resized, so everything becomes very tedious. I would start with Java Swing GUI, and then try out C++ GUI, Win32 or something else. |
|
#5
|
|||
|
|||
|
> How are interfaces designed in C++?
With the aid of one or more 3rd party libraries. The libraries you can choose from depends on your development platform. For example, on Windows, you have access to Win32API as well as any higher level frameworks like MFC, ATL, WTL and so on. You also have access to cross platform libraries like GTK+, QT, WxWidgets, FLTK, and so on. > How is the OOP applied to such an interface? Depends on how the library is designed but here's one way that you can have an OOP widget toolkit. Have a base window class that can be subclassed and modified. If you can derive specific widgets from base widgets and objects, you have the makings of an OOP toolkit. >What are the most preferred development environments? On Windows, Winforms, part of the .NET framework has become really popular, and for good reason. It actually makes GUI development easy, or at least light years ahead of everything else. Of course, you always have MFC, or the low level Win32 API. Otherwise, you have to choose from WxWidgets, GTK+, QT, or something else like FLTK. They are used on Linux, but they also happen to be cross platform. Consequently, a number of Windows GUIs use them as well. > where can I start researching GUIs Google terms are window toolkit, widget toolkit, GUI library, widget library, and so on to get a list of toolkits. I named the well known libraries like Win32 API, GTK+, and so on. Start by getting an overview of what each one entails. Then figure out which one you think you would prefer and learn that toolkit.
__________________
Need help with broken code? Your question should be like a good bug report: (1) It has the smallest number of steps to reproduce the problem you see (2) It tells us precisely what you expected to see and (3) It tells us what you saw and how it differed from what you expected. We need all three to help you. Want better answers? Tell us what you Googled for and what steps you took to answer your own question. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > From console to GUI apps |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|