Re: General discussion question?



Robby <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
First, I would like to know if the programming that I am learning from
Charles Petzold (WIN32) can be used to program normal Windows
applications in the future or must I go on to languages such as MFC
or .NET or ATL.

Let's put it this way. You can write applications Petzold style - but it
gets pretty boring pretty fast. You don't want to do that if you value
your sanity. You should choose a framework that takes care of basic
chores for you.

However, understanding how things work behind the scenes is very
helpful. It helps you read MSDN documentation. It helps you troubleshoot
problems. In helps on those (not so rare) occasions when your framework
of choice does not quite satisfy your needs, and you need to do it from
first principles.

Secondly, What is the difference between WIN32 (Charles Petzold) and
say MFC or .NET or ATL.

Win32 API is provided by the operating system. In a sense, it defines
the operating system. Everything else is built on top of Win32 API,
sometimes as a thin wrapper, sometimes providing significant new
functionality.

..NET Framework is a different from other frameworks in that it tries to
hide as much of the underlying OS functionality as possible. It strives
to provide a complete API of its own so that you should never have to
work at the lower level. Managed applications (those written to run on
..NET) are very different from native Win32 applications and those
written on MFC or ATL and such. Win32 knowledge is of limited utility to
..NET programmer, but still useful on occasion.

Really, I am learning WIN(32) because I later need to do some
application in Embeded VC++. The book I want to read for this is
"Programming Windows CE .NET' by Douglas Boling. But why is '.NET' in
the title of his book.

WinCE.NET supports .NET Compact Framework and allows one to write .NET
applications (aka managed applications) for it. I believe it also
supports Win32 so you have a choice of writing either managed or native
app.

You see, I tried to create a project in .NET and it was nice and cute
the
way I was able to click and drag a button onto a form, but when I
double clicked on the button, I sort of didn't recognize any code
that I am learning in Charles Petzold's book. I felt as if this was
another world of programming.

In many respects it is, and Petzold is of little help there. At least
the book you are reading - Petzold has a new book "Programming Microsoft
Windows Forms" which is all about .NET. I haven't read it, this is not
an endorsement. There are lots of other .NET related books (none of
which I read).
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.