I would like to ask you, how do you create MFC Apps (Visual C++ 6.0).
Do you use wizard or you start from scratch.
I am interesting in this "scratch thing".
Links, comments,... are appreciated
Thanks,
Damjan
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
"Damjan Vengušt" <damjan....@guest.arnes.si> wrote in message
news:%hLqb.5269$2B6.1...@news.siol.net...
The wizards handle all the details which are not worth worrying about. With the wizard,
you have a fully-functional framework in less than five minutes and can concentrate on the
real issues of the problem you want to solve. Without the wizard, you waste days trying to
get the framework to work at all, and even then, you probably don't get it all correct.
And changes become difficult. You have to do all the work the wizard does in thiry seconds
by tediously getting everything right yourself. I find it hard to justify wasting time on
such trivia when it is already automated.
All excuses I have seen about why it makes sense seem rather childish "I want to know what
every line of code does", "I want to type in every line myself", "I don't use all those
features and don't want to pay the cost for them" (this is perhaps the most absurd of the
lot; it says that the person creating the program is totally clueless about what is
important). Ultimately, it is one of those childish macho-programmer things that has no
place in modern software construction.
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
My entire reason for moving from Win32 API to MFC is that I got bored
of writing same app skeleton code again every time I started writing a
new application (fill in WNDCLASS, RegisterClass, check for errors,
Create main window, check for errors, write WindowProc blah blah...).
Writing everything from scratch each time quickly became a routine I
grew to hate.
MFC/ClassWizard combo takes care of these things and lets you
concentrate on implementing actual functionality for the app.
"Damjan Vengušt" <damjan....@guest.arnes.si> wrote in message
news:%hLqb.5269$2B6.1...@news.siol.net...
I wrote my first MFC app in less than two weeks, and it did so much more than I had ever
been able to do "by hand" that I never looked back. Funny thing is, I never missed the
WinMain function, nor have I ever cared about rewriting or overriding the built-in message
loop.
The accidents you incur that cause it to fall over are doing things like putting stuff in
the message map that ClassWizard can't parse, which is actually pretty easy to avoid. Just
keep all your changes outside the magic AFX comments. And the rest of the message map
syntax is dead easy:
ON_SOMETHING( some parameters )
applies everywhere, and most of these take 0-3 parameters, and they are mostly
well-documented, although sometimes (e.g., for the _EX entries) you have to grovel around
a bit to find that documentation.
I favor an incrmental approach to learning: take on faith everything you don't understand,
and concentrate on the things that matter. After a while, you need to know how something
works, then, and only then, spend the time researching it. I didn't even know C++ when I
started; now I can answer a reasonable number of C++ questions as well as MFC questions. I
find this overall a better approach than trying to learn everything-at-once; I've learned
a dozen or more languages this way, and I'm applying the same methodology to C# these
days. I will undoubtedly look back with deep embarrassment on my current C# code, but it
is still not bad as these things go. But a C# expert could probably see (as I probably
will in a year or two) a dozen easier ways to do something I've done. But this has not
stopped me from delivering a couple serious C# apps that customers can use, and one of my
own that I used as my learning testbed.
When learning MFC, single-stepping through the MFC code a lot at first will give you
insights into what it is doing; after a while, you don't bother with this. Knowing where
WinMain is gives little help, although it satisfies idle curiousity (if you never heard of
WinMain, you won't miss it).
Human beings are good mimics. It is a survival trait, and we do it very well. I found that
by imitating paradigms constructed by the wizards, even if I didn't understand them
syntactically, or even semantically, I was able to build an app to prototype level in
about ten days (the first four days were working through the Scribble example and studying
it carefully). By exercising my curiosity incrementally, I got to the point where I can
now be an MVP, but at no time was I overwhelmed by a need to get everything right just so
I could hand-simulate a wizard at all times.
joe
On Sat, 8 Nov 2003 11:04:17 +1030, "David Quinn" <kawi...@hotmail.com.NOSPAMcheers>
wrote:
Joseph M. Newcomer [MVP]
I will forget this scratch idea, and stick to the wizard. I just thought
that it is better start from scratch, because you know exactly what
you are doing (You understand the whole MFC framework,.. ). I guess I
forgot to ask myself: Do I really need to understand the core of MFC
framework, or just the basic things.
However I read some very good facts (in all those replies), why I
shouldn't start from scratch!
Thanks for helping me to clarify this thing.
I am really grateful,
Thanks, Damjan