📄 wpw_tool_book_95.html
字号:
<html>
<head>
<title></title>
</head>
<body>
<hr>
<a NAME="TOOL_LEARNING_WIN_PROG">
<p>Return to </a><a href="win_prog_wis_tool.html#TOC">Table of Contents for this chapter</a><br>
</p>
<h4>Subject: Learning Windows Programming</h4>
<pre>
>I ordered the Herb Schildt book -- the store had it listed as
>"Schildt's Windows 95 Programming in C and C++" (I assume that is the
>same book.... and they also had one by him called "Windows 95
>Programming Nuts" -- any idea what that one is about??).
I don't know about the "Nuts" book. The Schildt Win95 Programming in
C and C++ book is great for beginner Windows programmers. Much more
accessible than Petzold. All of the examples in it are in C, not C++
as the title suggests.
>I've also ordered the Microsoft Developers Network - Level 2 (I'm
>serious about this :-) ).
Good job. You will not be disapointed -- MDN2 will give you access to
all kinds of good stuff--Win95/NT (in various languages, no less), the
Win32 API, the Games SDK (eventually) and more.
>I've yet to pick a programming language, and was intrigued by your
>comments about Delphi (which were echoed in a magazine article).
Yes, Delphi is all the rage. And rightfully so.
>Your post ended with "I haven't touched on MFC nor Visual C++ 1.5x vs.
>2.x".
>I'd love to hear about both of those (as well as Visual C++ versus
>Delphi).
OK. But, again, this will be too brief. Basically, Microsoft currently
is selling two versions of its C/C++ compiler, Visual C++ 1.52, which is
the 16-bit environment, and Visual C++ 2.1 (v2.2 is available to MSDN
subscribers), which is the 32-bit environment. The problem with this
approach is that developers who wish to create 16 *and* 32-bit programs
in C or C++ using Microsoft's tools need to have 2 compilers installed--
the 32-bit version will not compile 16-bit apps at all, nor does it
support the "QuickWin" apps that VC++ 1.5 supports. Basically, the two
compilers are quite similiar although v2.x is clearly superior with
more integrated tools and a cleaner interface. VC++ 2.x also requires
a hefty memory footprint as well (20 Mb, although the "memory" can be
largely virtual memory if need be. An 8Mb machine will crawl on each
initial compile). I am actually somewhat of a fan of VC++ 2.x, although
I use it primarily to code in C, not C++. VC++, in either configuration,
has an integrated resource editor, App Studio, and various C++/MFC (more
on this later) tools to automate the construction of complex projects.
What sets VC++ apart from other C++ compilers is the MFC, short for
Microsoft Foundation Class. The MFC is a set of object oriented classes
(a "class library") that encapsulates the API. I don't really have the
time (or the stamina) to go into this fully; if you don't understand
C++ classes, you need to pick up a decent C++ book. The MFC (version
2.0 in VC++ 1.5x, and version 3.0 in VC++ 2.x -- I think) is a complex
library whose job purportedly is to make Windows programming easier. It
is supposed to shield the programmer from the API. A typical Windows
program, written in C, will call numerous API functions over the course
of its execution. MFC encapsulates these functions into member functions
that are accessible to member objects. It is a frustrating thing to learn
although it certainly has its adherents. The idea of abstracting the API
is a good one, I guess, although I am not a fan of MSoft's MFC. It seems
to me that good old ANSI C is simpler. Again, this is just my opinion.
So what we have here is two distinct ways, with the same compiler, to
program in Windows:
(1) ANSI C - the "Petzold" method, now popularized by Schildt, using
API function calls.
(2) C++ and MFC - the OOP method. There are other class libraries for
Windows, BTW (Borland's OWL comes to mind) but none have the clout
and mindshare of MFC.
Or....you could use Delphi. Delphi, from Borland, is a relatively new
object oriented programming language based on Object Pascal. The Delphi
IDE will be familiar to Visual Basic users. The Delphi language will be
a joy to use for all the Turbo Pascal programmers out there, and close
enough to C/C++ that those programmers will pick it up quickly. Compared
to programming in C/C++, Delphi is a joy to use. Like MFC, Delphi has
a class library, the VCL. Unlike the MFC, the VCl is easy to use, quick
and powerful. Delphi allows the programmer to visually design windows
and controls, but write code in the elegant and powerful object pascal
language, not in the kludgy Visual Basic. Delphi's compiler is blazingly
fast--you'll recall my comments about memory and VC++ above--compiling
programs that would take weeks of work with VC++ in just seconds.
I cannot stress enough what an incredible tool Delphi is. There are only
two problems, neither of which is fatal. Firstly, the documentation that
comes with Delphi is lacking. This is made up by the many excellent third
party books that are available. The second problem is that Delphi is
currently only a 16-bit Windows development tool (although it runs fine
under Windows 95). This problem will be addressed when Win95 ships--
Borland is promising a 32-bit version of Delphi soon after the release of
Win95. Borland is also promising that 16-bit programs written with
Delphi "16" will just need to be recompiled under "Delphi 32" to become
true Win32 apps, *and* they are promising a rebate to users who purchase
Delphi now toward the purchase of "Delphi 32" when it is released.
All in all, Delphi is an amazing product. As anyone who follows the
computer press knows, Delphi has yet to get anything but substantial
praise
from every review written thus far.
So, where does this leave us? If you are starting out with Windows
programming, I humbly suggest Delphi. Certainly, it will leave you
spoiled but you will achieve far more in the same time then a C
programmer could dream of. On the other hand, there is a legacy to
writing C/C++ code for Windows, and plenty of documentation. If you
feel the need to go the C/C++ route, I suggest starting off with C
and not C++/MFC. Despite the claims, MFC is best used *after* you have
a firm understanding of the API. On that note, I suggest the Schildt
book or even the Petzold book (which is now horribly dated).
Remember, too, that this is only my opinion. There will be others that
will argue effectively for C++, MFC, or even Visual Basic. In the end it
is your decision.
Good luck
Paul
</pre>
<hr>
<a NAME="TOOL_LEARNING_GetStart">
<p>Return to </a><a href="win_prog_wis_tool.html#TOC">Table of Contents for this chapter</a><br>
</p>
<h4>Subject: Getting Start</h4>
<pre>
Can someone suggest a starting point for learning how to program in
Windows? What is this I hear about the API? I am familiar with DOS
programming under several languages (BASIC, PASCAL, FORTRAN, C, C++,
80x86 Assembler, and some others).. but whenever I try to do something
in Windows I get stuck. Even Visual Basic seems like it should be
easier. I've also tried Borland's C++ and PASCAL for Windows with
similar results. I hear that it is supposed to be so easy to program
in Windows. I hear that so often that I feel that I must be missing
something or taking the wrong approach. I am no computer slouch and I
consider myself to be an at least semi-intelligent person.
I am just looking to get started. Just to do the very basic operations
necessary to write a program.
If anyone has a good starting point I would really appreciate it.
Maybe someone can tell me how they got started and give me a line on
their success story.
Any replies would be greatly appreciated.
Thank you for your time.
- Bob
olias@wizvax.net
</pre>
<hr>
<pre>olias@wizvax.net (Robert R. Cook) wrote:
>I am familiar with DOS programming under several languages (...)
>but whenever I try to do something in Windows I get stuck.
I know, I have the same problem. Until now I just build QuickWin
programs in Visual C and forget about the slick interface. Maybe this
is not so elegant, but at least I can make something that runs under
MS-Windows and I don't have to sell my programs to make a living
anyway.
>I hear that it is supposed to be so easy to program
>in Windows. I hear that so often that I feel that I must be missing
>something or taking the wrong approach.
Yes, I've also heard this. It's supposed to be easy because you have
to learn an entirely different approach. For those of us who are used
to linear programming (remember MBasic, remember line numbers?), it's
a torture.
By the way, I have experience in Basic, Pascal, Modula, C and Z80
assembler :-). For MS-Windows, I have Visual Basic (I hate it) and
Visual C (sort of okay, I'll just have to live with it).
Bye,
Pierre
--
Pierre Gielen
pg@xs4all.nl
</pre>
<hr>
<pre>olias@wizvax.net (Robert R. Cook) writes:
: Can someone suggest a starting point for learning how to program in
: Windows? What is this I hear about the API? I am familiar with DOS
: programming under several languages (BASIC, PASCAL, FORTRAN, C, C++,
: 80x86 Assembler, and some others).. but whenever I try to do something
: in Windows I get stuck. Even Visual Basic seems like it should be
: easier. I've also tried Borland's C++ and PASCAL for Windows with
: similar results. I hear that it is supposed to be so easy to program
Have you tried the step-by-step examples in BC++ OWL manual? I got
started that way. Since you are familiar with C++, you shouldn't have
trouble following that. But you didn't say what got you stuck, so I have
no idea what your real problem is.
: in Windows. I hear that so often that I feel that I must be missing
: something or taking the wrong approach. I am no computer slouch and I
: consider myself to be an at least semi-intelligent person.
: I am just looking to get started. Just to do the very basic operations
: necessary to write a program.
: If anyone has a good starting point I would really appreciate it.
To get a feeling about windows programming, you can try modifying some
examples included in your BC++ (or VC++, whatever) package.
--
Huayong
WWW home pages: Email:
http://www.math.umass.edu/~yang yang@math.umass.edu
http://www-unix.oit.umass.edu/~yang yang@twain.oit.umass.edu
</pre>
<hr>
<pre>In article <3s1uqu$e9n@news.xs4all.nl> pg@xs4all.nl "Pierre Gielen" writes:
>olias@wizvax.net (Robert R. Cook) wrote:
>
>>I hear that it is supposed to be so easy to program
>>in Windows. I hear that so often that I feel that I must be missing
>>something or taking the wrong approach.
>
>Yes, I've also heard this. It's supposed to be easy because you have
>to learn an entirely different approach. For those of us who are used
>to linear programming (remember MBasic, remember line numbers?), it's
>a torture.
I've been a professional Windows programmer for MANY years and *I* certainly
don't regard Windows programming as easy (I'd be out of a job if it was....).
Windows has probably the largest and most complex API of ANY operating
system I know of. In a way it's a lot harder now for people attempting to
learn Windows programming than it was back when I started learning. Not
only is the "core" API of Windows 3.1 a LOT larger than that of Windows 1 (!)
but you have OLE2 (1000+ APIs), WinG, MAPI, TAPI, OpenGL, and lots more
API sets too.
The best thing I can suggest is that you get a copy of Petzold's "Programming
Windows 3.1" and read it from cover to cover. The KEY to understanding
Windows programming is to have a clear grasp of the concepts of "event driven"
programming and the basics of the Windows API, and Petzold explains these
concepts better than anyone else I've ever encountered.
Keep at it - it WILL make sense!
Chris
--
--------------------------------------------------------------------------
| Chris Marriott, Warrington, UK | Author of SkyMap v2 shareware |
| chris@chrism.demon.co.uk | astronomy program for Windows. |
| For more info, see http://www.winternet.com/~jasc/skymap.html |
| Author member of Association of Shareware Professionals (ASP) |
--------------------------------------------------------------------------
</pre>
<hr>
<pre>Chris Marriott (chris@chrism.demon.co.uk) wrote:
> The best thing I can suggest is that you get a copy of Petzold's "Programming
> Windows 3.1" and read it from cover to cover.
Apart from the chapter on memory management which you should destroy
before it corrupts your mind and your code.
> Keep at it - it WILL make sense!
Yes, but how many more years will I have to keep up at it before that
happens :-)
-Steve
--
Steve Loughran
Hewlett-Packard Laboratories, Bristol
mailto:slo@hplb.hpl.hp.com
tel:+44 (117) 922 8717
</pre>
<hr>
<a NAME="TOOL_BOOK_OWL">
<pre>Return to </a><a href="win_prog_wis_tool.html#TOC">Table of Contents for this chapter</a>
</pre>
<h4>Subject: OWL Books</h4>
<pre>
Also, look at "Teach Yourself OWL Programming in 21 Days" by Ian Spencer.
It's published by SAMS, ISBN 0-672-30600-X. It covers OWL 2.5 and uses
BC4.x, including 4.5.
I am just beginning to poke around in it. Looks OK so far. Walnum's book
looks like a lot of good, practical stuff, but it's not organized for
learning OWL from scratch.
--
===================================================================
James M. Potter, President Internet: jpawi@roadrunner.com
JP Accelerator Works, Inc. AOL: jpawi@aol.com
2245 47th Street Voice: 505-662-5804
Los Alamos, NM 87544-1604 FAX: 505-662-5210
</pre>
<hr>
<a NAME="TOOL_BOOK_W32">
<pre>Return to </a><a href="win_prog_wis_tool.html#TOC">Table of Contents for this chapter</a>
</pre>
<h4>Subject: Book for "Win32 Programming Using Visual C++"</h4>
<pre>
Jaco van der Merwe <jjnvdm@firga.sun.ac.za> wrote:
>Can anyone recommend good books on the Microsoft Foundation Classes?
>
The best book I have seen so far is:
The Revolutionary Guide to Win32 Programming Using Visual C++
Mike Blaszczak
WROX Publishing
ISBN 1-874416-47-8
(Includes CDROM)
Blaszczak works for Microsoft and is a developer on MFC and indeed knows
his stuff. I've found the book invaluable.
--
========================================================================
Gary Coombs Windows Programming
5210 Lake Carlton Road Circular Reference...see Reference, Circular
Loganville, GA 30249
404.466.3374 gary@netsystems.com CServe 71020,425
========================================================================
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -