1. Re: Win32

David Gay wrote:

>[Petzold's book] actually uses Microsoft Visual C (which I do not
> have, I have DJGPP). It didn't make mention of this outside the
> cover, so I hoped it was a language-independant book about
> introductory programming in Windows95.

To some extent, there's not a lot point in writing a language-independant
book on Win32 programming. At some point, you will need to show examples of
real code, and like it or not, C is the ligua franca of the programming
world.

Petzold's book is favored for a number of reasons. For one thing, it's
written in C, not C++. It's fairly straight-forward to convert his code into
Euphoria. Books that focus on C++ or the Microsoft Foundation Class (MFC)
are fairly worthless in comparison.

Although Petzold's book uses Visual C, the actual code doesn't make use of
the "visual" portion of the compiler. The code is about as "generic" C as
can be reasonably possible. The translation from C into Win32 Euphoria is
fairly straight forward, if more than a little bit tedious.

On the other hand, Petzold is certainly not the end of Win32 coding - there
is quite a bit that he does not cover very adequately.


>  I found it to be a disappointment because it seemed like the
> author was rushing through to get to the programming without
> explaining about the Windows architecture. It's pointless to
> teach programming in Windows if you do not understand
> all of the terminology involved.

I've relied an a number of texts to explain the tedious details. I spent a
lot of time searching the Internet for "Win32 programming" topics.
Eventually, I found a text I liked, and tried to stick with it. You might
want to have a look at:



> For example, what is a two-byte or four-byte boundary? I know what a
> byte is, but what is a boundary?

If you want to code directly to the Win32 API in Euphoria, you're going to
need a fairly strong grasp on C data  structures and the like, because you
have to build these structures by hand. It's an additional level of
complexity that C programmers don't have to deal with.

I certainly can't document all this in any depth in the Win32Lib - one of
the points of the library is to *hide* details such as these from the users.
On the other hand, I haven't "dumbed down" Win32Lib; "power users" can use
it as a framework, and plug in their own Win32 API calls.

-- David Cuny

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu