Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 21st, 2006, 9:50 AM   #1
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
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:
Originally Posted by Mohamed Jihad
Durka durka!
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!
jayme is offline   Reply With Quote
Old Mar 21st, 2006, 12:17 PM   #2
Cache
Hobbyist
 
Join Date: Sep 2005
Posts: 261
Rep Power: 4 Cache is on a distinguished road
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.
Cache is offline   Reply With Quote
Old Mar 21st, 2006, 2:03 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I'd recommend .NET. It's basically what you're looking for. MFC be evil.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 21st, 2006, 2:50 PM   #4
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0 King is an unknown quantity at this point
.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!
King is offline   Reply With Quote
Old Mar 21st, 2006, 3:03 PM   #5
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
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.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:20 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC