![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Professional Programmer
|
Win32; wrapping it up
I have been seeing a lot of people talk about how horrible the win32 library is when programming GUI applications. People say it takes way too long and it's frustrating. What I was wondering is that C++ is an OOP language, so wouldn't making a gui be simple when programming it in an OOD? You could simply wrap your buttons up and everything into a function that gets certain properties, cutting down the production time by quite a bit. I'm not 100% sure if it would be faster or slower wrapping all your code into functions when using the win32 library. Has anyone tried it?
__________________
▄▄▄▄ Quote:
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it. Download Code::Blocks now! ▄▄▄▄ |
|
|
|
|
|
|
#2 |
|
Hobbyist
Join Date: Sep 2005
Posts: 261
Rep Power: 4
![]() |
MFC is basically what your talking about. I dont use MFC myself, but most of my Win32 API code is OO. I'd say it depends on what you're "wrapping up" and how much of it you want to wrap that determines how long it takes.
|
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I'd recommend .NET. It's basically what you're looking for. MFC be evil.
![]() |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0
![]() |
.Net is awesome for GUI apps, but it's a lot slower then using Win32. Win32 is a lot harder to use, but once you wrap your head around it, and get used to it, it's not that bad. A lot of companies still use Win32 API, so if your looking at getting into professional programming, it may be a good thing to know.
__________________
I am Addicted to Linux! |
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5
![]() |
I'm not shy about knocking Micrsoft when warranted, but they don't deserve it this time.
The win32 API is is actually based on quite very good OO design, and (in terms of GUI) program allows the programmer to create anything required (screens, buttons, menus, ....), respond to input from the user, and change appearance to suit. As far as comparable libraries are concerned (eg equivalents under unix) the win32 library is among the best. The difficulty for the humble programmer is that the win32 API is designed to be usable from a range of programming languages (both OO and non-OO). GUI elements have many attributes, so setting all those attributes to be "just so" involves a lot of effort. Microsoft and others (eg Borland/Inprise) have addressed that with tailored languages (eg VB, Borland C++), IDEs that support "drag and drop" design (eg the VB IDE, C++ Builder), libraries (eg MFC and the VCL), other design representations and programs to manipulate them (eg resource files and editors), and frameworks that combine all those elements (C#, .NET). The bottom line is that the programmer needs to use tools for the job. With GUI, using the set of tools that are built on top of the win32 library is vastly more productive than hand-rolling win32 calls from scratch, but the programmer can dive down into the guts using win32 calls directly if needed to do something specific. The situation on most other systems is comparable, and I'd argue that developing GUI is easier under windows than most version of unix. Under unix, there are similar problems with starting with a library and building an application. Anyone who has built a GUI using raw X (or variants of X, such as Motif) will have experienced the same challenges as a programmer under windows using the win32 library. The basic X library has same attributes as the win32 library: it is a comprehensive OO design in a non-OO wrapper so it can be used in multiple languages. To help a programmer make use of it, there are various class libraries and IDEs --- so many choices that it is difficult to count. Interestingly enough, I haven't come across programming languages in the unix world that are specifically tailored to support GUI (along the lines of VB or the extensions in Borland C++), but I wouldn't be surprised to learn that one is out there. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|