1 / 47
文档名称:

Chapter1 Windows Programming and MFC Application Framework.pdf

格式:pdf   页数:47
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Chapter1 Windows Programming and MFC Application Framework.pdf

上传人:rjmy2261 2012/12/31 文件大小:0 KB

下载得到文件列表

Chapter1 Windows Programming and MFC Application Framework.pdf

文档介绍

文档介绍:MFC and Visualized Programming
Chaper 1 Windows Programming and
MFC Introducing
Index
p The Windows Programming Model
n Message Processing
n Handles
n Windows APIs
n A Windows Program
p Introducing MFC
n The Visual C++ Components
n MFC Application Framework
The Windows Programming Model
p Programs written for traditional operating
environments use a procedural programming
model in which programs execute from top to
bottom in an orderly fashion.
p The path taken from start to finish may vary with
each invocation of the program depending on the
input it receives or the conditions under which it is
run, but the path remains fairly predictable.
The Windows Programming Model
p In a C program, execution begins with the first
line in the function named main and ends when
main returns.
In between, main might call other functions and
these functions might call even more functions,
but ultimately it is the program— not the
operating system— that determines what gets
called and when.
example1
The Windows Programming Model
p Windows programs operate differently. They use
the event-driven programming model, in which
applications respond to events by processing
messages sent by the operating system.
p An event could be a keystroke, a mouse click, or a
command for a window to repaint itself, among
other things.
The Windows Programming Model
Message Processing
p Where do e from, and what
kinds of information do they convey?
Windows defines hundreds of different message
types. Most messages have names that begin
with the letters "WM" and an underscore, as
in WM_CREATE and WM_PAINT.
Message Processing
p One way to characterize a Windows program is to
think of it as a collection of message handlers. To a
large extent, it is a program's unique way of
responding to messages that gives it its personality