PDA

View Full Version : C++ and ...



maxorator
09-09-2006, 05:43 AM
What do you use with C++? Do you use simplified low-performance wrappers like MFC, Qt, ATL, GTK+ etc or pure WinAPI?

Mario F.
09-09-2006, 06:02 AM
MFC all the time. And only WinAPI when it makes sense.
After all, I have schedules and deadlines to obey to. Try and do that with WinAPI.

(Of course this only applies to my job as a Visual Basic software engineer. But MFC and the WinAPI are really not that different between VB and C++)

cboard_member
09-09-2006, 06:54 AM
Win32. I'm on the verge of learning MFC but other stuff is taking priority right now, like remaining sane.

Seriously I know it's not *that* bad and seriously, I haven't found the time :)

maxorator
09-09-2006, 07:02 AM
Of course it's not bad. The strangest thing about it is that most of people say it's easier, but to me it looks way more complicated than pure WinAPI.

Mario F.
09-09-2006, 07:31 AM
Maybe because you didn't study it well enough yet ;)

Trust me, it isn't more complicated. Why do you think they developed it?

maxorator
09-09-2006, 08:08 AM
I don't know why they develop it...
But Win32 API was clear from the start: simple variables, simple functions.

I can make Win32 API applications quickly, too. Usually I copy code pieces from my previous application.

I've heard someone saying, that Win32 API is too difficult... if that's the basic problem of Win32 then I have no problem using it.

Mario F.
09-09-2006, 09:27 AM
No. It's not because it's difficult.

You have to ask yourself the question why companies worldwide favor MFC for their projects and not Windows API. And when you research it well enough (or have the experience yourself in the actual industry as a software developer/engineer/etc), you will realize that... tada! It's quicker to develop in MFC than it is in straight windows API.

And... that's all that matters. MFC may be ugly here and there, but it is a fairly more elegant approach to windows programming when compared to the windows API. Software development is about business decisions, schedules and deadlines. Failing to realize this and being pedantic around your choices is a sure step on your way to be sacked.

maxorator
09-09-2006, 09:42 AM
I will use MFC when I have deadlines and I can't finish the thing using Win32. But now, I don't work for any company, I just learn and test things (my productivity is about 2-3 simple programs a week :D).

Wow, I wonder what Salem is using...

twomers
09-09-2006, 09:54 AM
>> Wow, I wonder what Salem is using...

He probably made his own. I know I would if I had to write a warning against being asked for 1:1 help!!

kawk
09-09-2006, 09:59 AM
I use the SDL and my custom windowing library. :P

gcn_zelda
09-09-2006, 10:38 AM
WinAPI.

siavoshkc
09-09-2006, 10:40 AM
.NET is better than MFC.

Salem
09-09-2006, 11:08 AM
Some of us (quite a large number) write software which isn't PC bound, nor even has a GUI.
So questions like "which C++ GUI for win32" offer little meaning to us.

siavoshkc
09-09-2006, 12:16 PM
Some of us (quite a large number) write software which isn't PC bound, nor even has a GUI.
So questions like "which C++ GUI for win32" offer little meaning to us.

I am surprised, Salem didn't change the title.

Mad_guy
09-09-2006, 04:34 PM
It depends almost entirely on the situation at hand. I prefer the Win32 API to the MFC, the API feels more natural to me. If I was writing something intricate like a GUI for a compiler with stuff like syntax highlighting, intellisense, etc, I'd definately consider using the MFC instead or just go right to .NET. If I was writing an application that would both be Open source and cross platform, I'd probably go right for Qt (this is coming straight from someone who hates GTK, mind you,) although the license for it bugs me.

VirtualAce
09-09-2006, 08:01 PM
I use MFC with Win32 when needed. A lot of GDI+ is not in MFC but I must say MFC although not perfect is a far better approach to using the outdated, clunky Win32 API.

If you can understand C++ then MFC is a snap. I can write a complete dialog app in a couple of hours as opposed to days with Win32.

maxorator
09-09-2006, 11:53 PM
.NET is better than MFC.

.NET has nothing to do with C++

maxorator
09-10-2006, 12:35 AM
Salem, I like GUI programs, because I don't like that when I download a program, I have to open command prompt and surf to the right folder and then read the help with -h option and start guessing how do I use it. But console programs can be done in a much shorter time, am I right?

maxorator
09-10-2006, 02:37 AM
I use MFC with Win32 when needed. A lot of GDI+ is not in MFC but I must say MFC although not perfect is a far better approach to using the outdated, clunky Win32 API.

If you can understand C++ then MFC is a snap. I can write a complete dialog app in a couple of hours as opposed to days with Win32.

Bubba, you really need to learn using copy and paste. Because these things are very useful when programming in Win32. I have made so many Win32 programs that whatever I want to do, I can just copy it from somewhere. So I can make Win32 programs very quickly.

WIN32 API CANT BE OUTDATED BECAUSE IT IS THE ONLY API THAT WINDOWS USES.
Tell me, I'm wrong.
MFC IS based WinAPI, but just "tries" to "simplify" it.

Mario F.
09-10-2006, 03:18 AM
Outdated in the productivity sense, I believe that's what Bubba meant.

The MFC is a wrapper for the Windows API. It's arguable that it's a good one. However it is undeniable that you simply can't compete (assuming both have an equivalent level of proficiency. One in MFC, the other in straight API) with a MFC programmer as fast as development times are concerned. You simply can't, Max. Don't pursue this further.

Don't put "try" in parenthesis. It makes you look ignorant. Because it succeeds in simplifying the API to a great extent.

If you want you can say that the Windows API allows you a fine grain control over your GUI development. I can agree with that. But the power is not in using only the MFC or only the Windows API. However advocates that is nothing more than a mindless zealot with little knowledge on windows development. The power is in using both.

Until you realize the merits of the MFC when compared to the windows API you will not progress much in windows development. Not at least to a level that makes you an interesting candidate for a software house. It's good you like the API. It's even better you are (hopefully) becoming proficient with it to the point of coding blindfolded. But ignoring the MFC, bashing on it, moving it to second plane and otherwise refusing to acknowledge its merits... is simply degrading you to the status of an ignorant.

Sorry mate. Don't mean to offend you. Just trying to open your eyes. Take it as you may.

maxorator
09-10-2006, 03:57 AM
Until you realize the merits of the MFC when compared to the windows API you will not progress much in windows development
Everything else, but this sentence, makes sense. MFC is simplification. You can still progress without using simplifications. Win32 API is exactly as good as you know, how to use it.

If there are nothing, that forces me to use MFC, I will not use it. If I get a job, where I need to program using MFC, I will do it. But as long as it's not necessary, there's no point using it.

Mario F.
09-10-2006, 04:08 AM
> Everything else, but this sentence, makes sense

Because its context is explained in the next sentence.

siavoshkc
09-10-2006, 04:26 AM
Bubba, you really need to learn using copy and paste. Because these things are very useful when programming in Win32. I have made so many Win32 programs that whatever I want to do, I can just copy it from somewhere. So I can make Win32 programs very quickly.

You copy/paste your code everytime you need a particular job? Why? Put your codes in some functions, put all functions in a header and use them. But there is no need to do so, Microsoft has done this for you. MFC.

maxorator
09-10-2006, 04:33 AM
MFC does not only consist of functions. If it would be just a collection of functions, there would be no problems with it. But it defines some freaky types, that are needed in the functions, it requires using huge pointless classes for everything etc. MFC is much more (or much less) that just a group of functions. It tries to change the whole interface of WinAPI.

siavoshkc
09-10-2006, 04:37 AM
If it would be just a collection of functions, there would be no problems with it. But it defines some freaky types, that are needed in the functions, it requires using huge pointless classes for everything etc.

Of course you will have to use classes and new types when you are developing such a huge library.

maxorator
09-10-2006, 04:39 AM
Win32 is clean and simple. Plus when everything is based on it, why use those things that are basically the same thing when I am satisfied with Win32 itself?

siavoshkc
09-10-2006, 04:56 AM
Win32 is clean and simple. Plus when everything is based on it, why use those things that are basically the same thing when I am satisfied with Win32 itself?

Who said you must use that? If you are comfortable with Win32, go on with it.

Dante Shamest
09-10-2006, 06:59 AM
I like the Win32 API because it has "Win" in it. It makes me feel victorious.

I like MFC because it has 3 letters. And 3 letters is easier to type.

And so on...

Shakti
09-10-2006, 07:41 AM
Max what you are doing is that you draw everything to the extremes here, you say that "ok pure mfc is inferior to winapi", while that may be true (wont argue because I dont have enough experience coding these kind of apps), but mfc mixed with winapi will beat pure winapi. You say winapi is clean and simple, I say its bloated and utterly overcomplicated (probably has to be since its generic), its all a matter of personal taste but keep this in mind, it is always better to know how to do a task in 2 ways than in 1 way.

maxorator
09-10-2006, 07:46 AM
"it's all matter of personal taste" and "will beat pure winapi" don't really match.
You can't say it beats something, because you're right, it's all matter of personal taste.

Shakti
09-10-2006, 07:48 AM
I was referring to this: "You say winapi is clean and simple, I say its bloated and utterly overcomplicated (probably has to be since its generic)"

And in that case it is a matter of personal taste; I like mfc better, you may like winapi better...