录
第 1 章 \^ ^ 1 0 从5 编程概述...................................................................................................................... 1
1.1 \¥ 4 3 2 程序概述..........................................................................................................................1
1.2 图形界面编程.............................................................................................................................. 1
1 . 3 消息传递机制.............................................................................................................................. 7
1.4 〜 4 3 2 ^ 1 概述...........................................................................................................................7
1.5 为什么用A PI.............................................................................................................................. 8
1.6 如何在程序中凋用人朽函数...................................................................................................8
1 . 7 本书示例约定..............................................................................................................................8
第2 章窗口处理......................................................................................................................................10
2.1 窗口简介.....................................................................................................................................10
2.2 窗口的创建和撤销................................................................................................................... 10
2.2.1 创建普通窗口 (CreateW indow、CreateW indowEx)
.........................................
10
2.2.2 关闭窗口(CloseW indow) .......................................................................................19
2.2.3 销毁窗口(DestroyW indow) ...................................................................................20
2.3 窗口类操作................................................................................................................................ 21
2.3.1 注册窗口类(RegisterClass、RegisterClassEx) ..................................................21
2.3.2 撤销窗 口 类 ( UnregisterClass )
............................................................................... 23
2.3.3 获得窗 口 类信息( GetClassInfoEx ) .......................................................................24
2 . 3 . 4 得到指定窗口的窗口类(GetClassName ) ............................................................25
2.4 窗口之间的关系........................................................................................................................26
2.4.1 父子关系(SetParent、GetParent、IsC hild)
.......................................................
26
2.4.2 遍历窗口(EnumWindow、EnumWindowProc、EnumChildWindows,
EnumChildProc) ......................................................................................................... 29
2.4.3 获取指定的子窗口(ChildWindowFromPoint、ChildWindowFromPointEx) 31
2.4.4 获得特定的窗口(GetWindow、GetTopWindow、GetNextWindow,
GetDesktopW indow) ..................................................................................................33
2 . 5 窗口的大小、位置和布局...................................................................................................... 37
2.5.1 获取窗口大4、(GetWindowRect、GetClientRect) .............................................37
2.5.2 调整窗口大小(AdjustWindowRect、AdjustWindowRectEx)
.........................
39
2.5.3 设置和获取窗口位置(SetWindowPos) ............................................................... 41
2.5.4 移动窗口位置(MoveWindow) .............................................................................. 43
2.5.5 设置和获取窗口布局(SetWindowPlacement、GetWindowPlacement)
........
44
2.5.6 设置和获得视口坐标起点(SetViewportOrgEx、GetViewportOrgEx)
.........
45
2.5.7 设置和获取视口坐标范围(SetViewportExtEx、GetViewportExtEx)
...........
47
2.5.8 设置和获取窗口坐标起点(SetWindowOrgEx、GetWindowOrgEx)
............
48