Visual Basic程序员Windows API编程手册
分类: 图书,计算机/网络,程序设计,Basic VB VB Script,
作者: 林永 编著
出 版 社: 人民邮电出版社
出版时间: 2002-6-1字数: 1232千版次: 1版1次页数: 789印刷时间: 2002/06/01开本:印次:纸张: 胶版纸I S B N : 9787115100689包装: 平装内容简介
本书是一本面向Visual Basic程序员的Windows API编程手册。书中收录了Visual Basic编程中涉及到的标准Windows API函数,涵盖窗口、硬件系统、消息、设备场景、绘图、图形、图像处理、文本、字体、打印、文件、进程和线程、网络、多媒体等各个方面,详细介绍了API函数在Visual Basic中使用的方法。 书中大部分函数后给出了有针对性的简短示例,大部分章节的末尾给出了函数应用的综合性实例,帮助读者在尽可能短的时间内掌握Windows API编程技巧,创建功能强大的应用程序。 本书内容丰富,实用性强,主要面向初、中级的Visual Basic程序员,也可作为有经验的Visual Basic程序员编程的参考手册。
目录
第1章 Windows API简介1
1.1 动态链接库(DLL)1
1.2 应用程序编程接口(API)3
1.2.1 Windows API与Visual Basic3
1.2.2 主要的DLL库及其功能简介3
1.2.3 在Visual Basic中调用Windows API4
1.3 Windows API相关概念8
1.3.1 句柄9
1.3.2 数据类型10
第2章 窗口与消息函数15
2.1 获取窗口的信息函数15
2.1.1 GetClassInfo,GetClassInfoEx16
2.1.2 GetClassLong17
2.1.3 GetClassName17
2.1.4 GetClassWord18
2.1.5 SetClassLong18
2.1.6 SetClassWord18
2.1.7 GetDesktopWindow20
2.1.8 GetWindowLong21
2.1.9 GetWindowWord23
2.1.10 SetWindowLong24
2.1.11 SetWindowWord26
2.1.12 GetWindowText27
2.1.13 GetWindowTextLength28
2.1.14 SetWindowText29
2.1.15 IsChild29
2.1.16 IsIconic30
2.1.17 IsWindow31
2.1.18 IsWindowEnabled33
2.1.19 IsWindowUnicode34
2.1.20 IsWindowVisible35
2.1.21 IsZoomed35
2.1.22 GetWindowContextHelpId36
2.1.23 GetWindowPlacement36
2.2 确定窗口相互间关系的函数36
2.2.1 EnumWindows37
2.2.2 EnumChildWindows38
2.2.3 EnumThreadWindows38
2.2.4 FindWindow40
2.2.5 FindWindowEx42
2.2.6 GetWindow44
2.2.7 GetActiveWindow45
2.2.8 GetCapture47
2.2.9 GetFocus47
2.2.10 GetForegroundWindow48
2.2.11 GetLastActivePopup49
2.2.12 GetParent49
2.2.13 GetTopWindow50
2.2.14 AnyPopup50
2.2.15 ChildWindowFromPoint,
ChildWindowFromPointEx50
2.2.16 SetActiveWindow51
2.2.17 SetCapture51
2.2.18 SetFocus,SetFocusAPI53
2.2.19 SetForegroundWindow53
2.2.20 SetParent54
2.3 控制窗口外观和行为的函数55
2.3.1 ArrangeIconicWindows55
2.3.2 BeginDeferWindowPos55
2.3.3 BringWindowToTop56
2.3.4 CascadeWindows,CascadeWindowsBynum57
2.3.5 CloseWindow57
2.3.6 DeferWindowPos57
2.3.7 DestroyWindow59
2.3.8 EnableWindow59
2.3.9 EndDeferWindowPos60
2.3.10 FlashWindow60
2.3.11 LockWindowUpdate61
2.3.12 MoveWindow63
2.3.13 OpenIcon63
2.3.14 ReleaseCapture63
2.3.15 SetWindowPlacement64
2.3.16 SetWindowPos65
2.3.17 ShowOwnedPopups66
2.3.18 ShowWindow66
2.3.19 ShowWindowAsync67
2.3.20 TileWindows67
2.3.21 UpdateWindow68
2.4 操作窗口中客户区的函数68
2.4.1 AdjustWindowRect,AdjustWindowRectEx68
2.4.2 ClientToScreen69
2.4.3 CopyRect71
2.4.4 DrawAnimatedRects72
2.4.5 EqualRect73
2.4.6 GetClientRect73
2.4.7 GetUpdateRect74
2.4.8 GetWindowRect75
2.4.9 InflateRect79
2.4.10 IntersectRect80
2.4.11 InvalidateRect,InvalidateRectBynum80
2.4.12 OffsetRect80
2.4.13 PtInRect81
2.4.14 RedrawWindow82
2.4.15 ScrollWindow83
2.4.16 ScrollWindowEx84
2.4.17 SetRect85
2.4.18 SetRectEmpty85
2.4.19 SubtractRect85
2.4.20 ValidateRect86
2.5 其他与窗口相关的函数87
2.5.1 AttachThreadInput87
2.5.2 ScreenToClient87
2.5.3 SetWindowContextHelpId87
2.5.4 WindowFromPoint88
2.6 综合示例88
第3章 硬件与系统函数95
3.1 键盘输入与字符集函数97
3.1.1 ActivateKeyboardLayout97
3.1.2 GetKeyboardLayout97
3.1.3 GetAsyncKeyState97
3.1.4 GetKeyboardLayoutList100
3.1.5 GetKeyboardLayoutName101
3.1.6 GetKeyboardState102
3.1.7 GetKeyboardType105
3.1.8 GetKeyNameText106
3.1.9 GetKeyState106
3.1.10 keybd_event108
3.1.11 LoadKeyboardLayout108
3.1.12 MapVirtualKey109
3.1.13 MapVirtualKeyEx110
3.1.14 OemKeyScan110
3.1.15 OemToChar, OemToCharBuff110
3.1.16 SetKeyboardState111
3.1.17 ToAscii, ToAsciiEx111
3.1.18 ToUnicode112
3.1.19 UnloadKeyboardLayout113
3.1.20 VkKeyScan, VkKeyScanEx113
3.2 语言地区代码页相关函数113
3.2.1 CharToOem, CharToOemBuff113
3.2.2 ConvertDefaultLocale114
3.2.3 EnumCalendarInfo114
3.2.4 EnumDateFormats115
3.2.5 EnumSystemCodePages115
3.2.6 EnumDateFormats116
3.2.7 EnumTimeFormats116
3.2.8 GetACP116
3.2.9 GetCPInfo117
3.2.10 GetCurrencyFormat,
GetCurrencyFormatBynum117
3.2.11 GetDateFormat118
3.2.12 GetKBCodePage119
3.2.13 GetOEMCP119
3.2.14 GetLocaleInfo119
3.2.15 GetLocalTime120
3.2.16 GetNumberFormat,
GetNumberFormatBynum121
3.2.17 GetOEMCP122
3.2.18 GetSystemDefaultLangID122
3.2.19 GetSystemDefaultLCID122
3.2.20 GetThreadLocale122
3.2.21 GetTimeFormat122
3.2.22 GetTimeZoneInformation123
3.2.23 GetUserDefaultLangID124
3.2.24 GetUserDefaultLCID124
3.2.25 IsValidCodePage124
3.2.26 IsValidLocale124
3.2.27 SetLocaleInfo124
3.2.28 SetLocalTime125
3.2.29 SetThreadLocale125
3.2.30 SystemTimeToTzSpecificLocalTime125
3.3 系统信息相关函数126
3.3.1 GetSysColor126
3.3.2 GetSystemInfo128
3.3.3 GetSystemMetrics129
3.3.4 GetSystemPowerStatus134
3.3.5 GetSystemTime134
3.3.6 GetSystemTimeAdjustment134
3.3.7 GetTickCount135
3.3.8 GetUserName136
3.3.9 GetVersion137
3.3.10 GetVersionEx138
3.3.11 GlobalMemoryStatus函数140
3.3.12 SetComputerName141
3.3.13 SetSysColors142
3.3.14 SetSystemTime142
3.3.15 SetSystemTimeAdjustment143
3.3.16 SetThreadLocale144
3.3.17 SetTimeZoneInformation144
3.3.18 SystemParametersInfo, SystemParametersInfoByval144
3.4 光标(插入符)与鼠标输入函数150
3.4.1 ClipCursor, ClipCursorBynum150
3.4.2 CreateCaret150
3.4.3 DestroyCaret152
3.4.4 GetCaretBlinkTime152
3.4.5 GetCaretPos153
3.4.6 GetClipCursor153
3.4.7 GetCursor153
3.4.8 GetCursorPos154
3.4.9 GetDoubleClickTime154
3.4.10 HideCaret154
3.4.11 SetCursor155
3.4.12 SetCursorPos157
3.4.13 SetDoubleClickTime157
3.4.14 mouse_event158
3.4.15 ShowCaret159
3.4.16 ShowCursor159
3.4.17 SwapMouseButton160
3.5 其他函数161
3.5.1 Beep161
3.5.2 ExitWindowsEx161
3.5.3 ExpandEnvironmentStrings162
3.5.4 FreeEnvironmentStrings163
3.5.5 GetEnvironmentStrings163
3.5.6 GetEnvironmentVariable164
3.5.7 GetLastError164
3.5.8 GetQueueStatus165
3.5.9 MessageBeep166
3.5.10 SetEnvironmentVariable167
3.6 综合示例167
第4章 设备场景函数183
4.1 获取和释放设备场景函数185
4.1.1 CreateCompatibleDC185
4.1.2 CreateDC, CreateDCBynum185
4.1.3 CreateIC189
4.1.4 DeleteDC189
4.1.5 GetDC189
4.1.6 GetDCEx191
4.1.7 GetWindowDC192
4.1.8 ReleaseDC192
4.1.9 WindowFromDC194
4.2 坐标映射函数195
4.2.1 CombineTransform197
4.2.2 DPtoLP197
4.2.3 GetDCOrgEx197
4.2.4 GetGraphicsMode198
4.2.5 GetMapMode198
4.2.6 GetViewportExtEx198
4.2.7 GetViewportOrgEx199
4.2.8 GetWindowExtEx199
4.2.9 GetWindowOrgEx199
4.2.10 GetWorldTransform200
4.2.11 LPtoDP200
4.2.12 ModifyWorldTransform200
4.2.13 OffsetViewportOrgEx201
4.2.14 OffsetWindowOrgEx201
4.2.15 ScaleViewportExtEx201
4.2.16 ScaleWindowExtEx202
4.2.17 ScrollDC202
4.2.18 SetGraphicsMode203
4.2.19 SetMapMode203
4.2.20 SetViewportExtEx204
4.2.21 SetViewportOrgEx204
4.2.22 SetWindowExtEx205
4.2.23 SetWindowOrgEx205
4.2.24 SetWorldTransform205
4.3 区域和剪裁函数206
4.3.1 CombineRgn206
4.3.2 CreateEllipticRgn211
4.3.3 CreateEllipticRgnIndirect211
4.3.4 CreatePolygonRgn212
4.3.5 CreatePolyPolygonRgn214
4.3.6 CreateRectRgn215
4.3.7 CreateRectRgnIndirect215
4.3.8 CreateRoundRectRgn216
4.3.9 EqualRgn216
4.3.10 ExcludeClipRect216
4.3.11 ExcludeUpdateRgn217
4.3.12 ExtCreateRegion217
4.3.13 ExtSelectClipRgn218
4.3.14 FillRgn218
4.3.15 FrameRgn219
4.3.16 GetBoundsRect219
4.3.17 GetClipBox220
4.3.18 GetClipRgn220
4.3.19 GetRegionData220
4.3.20 GetRgnBox221
4.3.21 GetUpdateRgn223
4.3.22 InvertRgn224
4.3.23 ModifyWorldTransform224
4.3.24 OffsetClipRgn224
4.3.25 OffsetRgn225
4.3.26 PaintRgn225
4.3.27 PtInRegion226
4.3.28 PtVisible226
4.3.29 RectInRegion226
4.3.30 RectVisible226
4.3.31 SelectClipRgn227
4.3.32 SetBoundsRect227
4.3.33 SetRectRgn228
4.3.34 SetWindowRgn228
4.3.35 ValidateRgn230
4.4 堆栈函数231
4.4.1 RestoreDC231
4.4.2 SaveDC231
4.5 设备场景信息函数232
GetDeviceCaps232
第5章 绘图函数240
5.1 GDI绘图对象创建函数240
5.1.1 CreateBrushIndirect240
5.1.2 CreateBrushIndirect241
5.1.3 CreateDIBPatternBrush,
CreateDIBPatternBrushPt241
5.1.4 CreateEnhMetaFile242
5.1.5 CreateHatchBrush243
5.1.6 CreateMetaFile243
5.1.7 CreatePatternBrush244
5.1.8 CreatePen245
5.1.9 CreatePenIndirect246
5.1.10 CreateSolidBrush246
5.1.11 ExtCreatePen249
5.1.12 GetStockObject250
5.1.13 GetSysColorBrush251
5.2 绘图对象选取和释放函数251
5.2.1 DeleteObject251
5.2.2 EnumObjects252
5.2.3 GetCurrentObject253
5.2.4 GetObjectAPI253
5.2.5 GetObjectType253
5.3 绘图属性和绘图函数255
5.3.1 AngleArc255
5.3.2 Arc,ArcTo256
5.3.3 CancelDC258
5.3.4 Chord258
5.3.5 DrawEdge259
5.3.6 DrawEscape260
5.3.7 DrawFocusRect260
5.3.8 DrawFrameControl260
5.3.9 DrawState261
5.3.10 Ellipse263
5.3.11 ExtFloodFill264
5.3.12 FillRect264
5.3.13 FloodFill265
5.3.14 FrameRect265
5.3.15 GdiFlush266
5.3.16 GdiGetBatchLimit266
5.3.17 GdiSetBatchLimit266
5.3.18 GetArcDirection267
5.3.19 GetBkColor267
5.3.20 GetBkMode268
5.3.21 GetBrushOrgEx268
5.3.22 GetCurrentPositionEx269
5.3.23 GetMiterLimit269
5.3.24 GetNearestColor269
5.3.25 GetPixel269
5.3.26 GetPolyFillMode270
5.3.27 GetROP2270
5.3.28 GetSysColorBrush271
5.3.29 InvertRect271
5.3.30 LineDDA273
5.3.31 LineTo273
5.3.32 MoveToEx273
5.3.33 PaintDesktop274
5.3.34 Pie274
5.3.35 PolyBezier, PolyBezierTo275
5.3.36 PolyDraw275
5.3.37 Polygon276
5.3.38 Polyline, PolyLineTo276
5.3.39 PolyPolygon277
5.3.40 PolyPolyline278
5.3.41 Rectangle279
5.3.42 RoundRect280
5.3.43 SetArcDirection280
5.3.44 SetBkColor280
5.3.45 SetBkMode281
5.3.46 SetBrushOrgEx281
5.3.47 SetMiterLimit282
5.3.48 SetPixel282
5.3.49 SetPixelV282
5.3.50 SetPolyFillMode283
5.3.51 SetROP2283
5.4 路径函数284
5.4.1 AbortPath285
5.4.2 BeginPath285
5.4.3 CloseFigure285
5.4.4 EndPath286
5.4.5 FillPath286
5.4.6 FlattenPath286
5.4.7 GetPath286
5.4.8 PathToRegion287
5.4.9 SelectClipPath287
5.4.10 StrokeAndFillPath288
5.4.11 StrokePath288
5.4.12 WidenPath289
5.5 图元文件函数289
5.5.1 CloseEnhMetaFile290
5.5.2 CloseMetaFile290
5.5.3 CopyEnhMetaFile291
5.5.4 CopyMetaFile291
5.5.5 CreateEnhMetaFile291
5.5.6 CreateMetaFile292
5.5.7 DeleteEnhMetaFile293
5.5.8 DeleteMetaFile293
5.5.9 EnumEnhMetaFile293
5.5.10 EnumMetaFile294
5.5.11 GdiComment294
5.5.12 GetEnhMetaFile295
5.5.13 GetEnhMetaFileBits296
5.5.14 GetEnhMetaFileDescription296
5.5.15 GetEnhMetaFileHeader297
5.5.16 GetEnhMetaFilePaletteEntries297
5.5.17 GetMetaFile297
5.5.18 GetMetaFileBitsEx298
5.5.19 GetWinMetaFileBits298
5.5.20 PlayEnhMetaFile299
5.5.21 PlayEnhMetaFileRecord299
5.5.22 PlayMetaFile299
5.5.23 PlayMetaFileRecord300
5.5.24 SetEnhMetaFileBits300
5.5.25 SetMetaFileBitsEx301
5.5.26 SetWinMetaFileBits301
第6章 位图、图标和光栅运算函数302
6.1 Windows中图像的处理概述302
6.2 设备无关位图函数303
6.2.1 CreateDIBitmap306
6.2.2 CreateDIBSection306
6.2.3 GetDIBColorTable307
6.2.4 GetDIBits308
6.2.5 SetDIBColorTable308
6.2.6 SetDIBits309
6.2.7 SetDIBitsToDevice309
6.2.8 StretchDIBits310
6.3 设备相关位图函数311
6.3.1 CopyImage312
6.3.2 CreateBitmap313
6.3.3 CreateBitmapIndirect313
6.3.4 CreateCompatibleBitmap313
6.3.5 GetBitmapBits314
6.3.6 GetBitmapDimensionEx316
6.3.7 LoadBitmap, LoadBitmapBynum317
6.3.8 LoadImage, LoadImageBynum317
6.3.9 SetBitmapBits320
6.3.10 SetBitmapDimensionEx320
6.4 位图传输函数320
6.4.1 BitBlt322
6.4.2 GetStretchBltMode324
6.4.3 MaskBlt324
6.4.4 PatBlt325
6.4.5 PlgBlt325
6.4.6 SetStretchBltMode326
6.4.7 StretchBlt327
6.5 图标和指针函数329
6.5.1 CreateCursor329
6.5.2 CreateIcon331
6.5.3 CreateIconIndirect332
6.5.4 DestroyCursor332
6.5.5 DestroyIcon333
6.5.6 DrawIcon334
6.5.7 DrawIconEx336
6.5.8 ExtractAssociatedIcon337
6.5.9 ExtractIcon337
6.5.10 GetIconInfo339
6.5.11 LoadCursor, LoadCursorBynum339
6.5.12 LoadCursorFromFile339
6.5.13 LoadIcon, LoadIconBynum340
6.6 调色板340
6.6.1 计算机色彩系统340
6.6.2 调色板342
6.7 综合示例349
第7章 菜单函数357
7.1 菜单函数357
7.1.1 AppendMenu357
7.1.2 CheckMenuItem359
7.1.3 CheckMenuRadioItem360
7.1.4 CreateMenu361
7.1.5 CreatePopupMenu361
7.1.6 DeleteMenu361
7.1.7 DestroyMenu361
7.1.8 DrawMenuBar362
7.1.9 EnableMenuItem363
7.1.10 GetMenu363
7.1.11 GetMenuCheckMarkDimensions365
7.1.12 GetMenuContextHelpId365
7.1.13 GetMenuDefaultItem365
7.1.14 GetMenuItemCount365
7.1.15 GetMenuItemID366
7.1.16 GetMenuItemInfo366
7.1.17 GetMenuItemRect366
7.1.18 GetMenuState367
7.1.19 GetMenuString367
7.1.20 GetSubMenu368
7.1.21 GetSystemMenu371
7.1.22 HiliteMenuItem371
7.1.23 InsertMenu372
7.1.24 InsertMenuItem372
7.1.25 IsMenu373
7.1.26 LoadMenu373
7.1.27 LoadMenuIndirect373
7.1.28 MenuItemFromPoint374
7.1.29 ModifyMenu,ModifyMenuBynum374
7.1.30 RemoveMenu376
7.1.31 SetMenu376
7.1.32 SetMenuContextHelpId376
7.1.33 SetMenuDefaultItem377
7.1.34 SetMenuItemBitmaps377
7.1.35 SetMenuItemInfo378
7.1.36 TrackPopupMenu, TrackPopupMenuBynum378
7.1.37 TrackPopupMenuEx379
7.2 综合示例380
第8章 文本和字体函数388
8.1 文本和字体简介388
8.2 文本和字体函数389
8.2.1 AddFontResource389
8.2.2 CreateFont389
8.2.3 CreateFontIndirect394
8.2.4 CreateScalableFontResource396
8.2.5 DrawText396
8.2.6 DrawTextEx400
8.2.7 EnumFontFamilies402
8.2.8 EnumFontFamiliesEx406
8.2.9 EnumFonts406
8.2.10 ExtTextOut406
8.2.11 GetAspectRatioFilterEx408
8.2.12 GetCharABCWidths408
8.2.13 GetCharABCWidthsFloat409
8.2.14 GetCharacterPlacement409
8.2.15 GetCharWidth, GetCharWidth32, GetCharWidthFloat410
8.2.16 GetFontData411
8.2.17 GetFontLanguageInfo411
8.2.18 GetGlyphOutline412
8.2.19 GetKerningPairs412
8.2.20 GetOutlineTextMetrics412
8.2.21 GetRasterizerCaps413
8.2.22 GetTabbedTextExtent413
8.2.23 GetTextAlign414
8.2.24 GetTextCharacterExtra414
8.2.25 GetTextCharset414
8.2.26 GetTextCharsetInfo415
8.2.27 GetTextColor415
8.2.28 GetTextExtentExPoint415
8.2.29 GetTextExtentPoint, GetTextExtentPoint32416
8.2.30 GetTextFace419
8.2.31 GetTextMetrics419
8.2.32 GrayString, GrayStringByString421
8.2.33 PolyTextOut423
8.2.34 RemoveFontResource423
8.2.35 SetMapperFlags423
8.2.36 SetTextAlign424
8.2.37 SetTextCharacterExtra425
8.2.38 SetTextColor426
8.2.39 SetTextJustification426
8.2.40 TabbedTextOut427
8.2.41 TextOut428
第9章 打印函数429
9.1 Windows打印简介429
9.2 打印函数430
9.2.1 AbortDoc430
9.2.2 AbortPrinter431
9.2.3 AddForm431
9.2.4 AddJob431
9.2.5 AddMonitor432
9.2.6 AddPort432
9.2.7 AddPrinter432
9.2.8 AddPrinterConnection433
9.2.9 AddPrinterDriver433
9.2.10 AddPrintProcessor434
9.2.11 AddPrintProvidor434
9.2.12 AdvancedDocumentProperties434
9.2.13 ClosePrinter435
9.2.14 ConfigurePort435
9.2.15 ConnectToPrinterDlg436
9.2.16 DeleteForm436
9.2.17 DeleteMonitor436
9.2.18 DeletePort437
9.2.19 DeletePrinter437
9.2.20 DeletePrinterConnection437
9.2.21 DeletePrinterDriver437
9.2.22 DeletePrintProcessor438
9.2.23 DeletePrintProvidor438
9.2.24 DeviceCapabilities439
9.2.25 DocumentProperties442
9.2.26 EndDocAPI443
9.2.27 EndDocPrinter443
9.2.28 EndPage443
9.2.29 EndPagePrinter444
9.2.30 EnumForms444
9.2.31 EnumJobs444
9.2.32 EnumMonitors445
9.2.33 EnumPorts445
9.2.34 EnumPrinterDrivers449
9.2.35 EnumPrinters449
9.2.36 EnumPrintProcessorDatatypes452
9.2.37 EnumPrintProcessors453
9.2.38 Escape453
9.2.39 FindClosePrinterChangeNotification455
9.2.40 FindFirstPrinterChangeNotification455
9.2.41 FindNextPrinterChangeNotification456
9.2.42 FreePrinterNotifyInfo456
9.2.43 GetForm457
9.2.44 GetJob457
9.2.45 GetPrinter458
9.2.46 GetPrinterData458
9.2.47 GetPrinterDriver459
9.2.48 GetPrinterDriverDirectory459
9.2.49 GetPrintProcessorDirectory460
9.2.50 OpenPrinter460
9.2.51 PrinterMessageBox461
9.2.52 PrinterProperties461
9.2.53 ReadPrinter462
9.2.54 ResetDC462
9.2.55 ResetPrinter463
9.2.56 ScheduleJob463
9.2.57 SetAbortProc463
9.2.58 SetForm464
9.2.59 SetJob464
9.2.60 SetPrinter465
9.2.61 SetPrinterData465
9.2.62 StartDoc466
9.2.63 StartDocPrinter466
9.2.64 StartPage467
9.2.65 StartPagePrinter467
9.2.66 WritePrinter467
第10章 文件处理函数468
10.1 文件介绍468
10.2 文件的创建和存取函数468
10.2.1 CloseHandle468
10.2.2 CreateFile469
10.2.3 CreateFileMapping471
10.2.4 FlushFileBuffers472
10.2.5 FlushViewOfFile472
10.2.6 lclose472
10.2.7 lcreat472
10.2.8 llseek473
10.2.9 LockFile473
10.2.10 LockFileEx474
10.2.11 lopen475
10.2.12 MapViewOfFile, MapViewOfFileEx475
10.2.13 OpenFile476
10.2.14 OpenFileMapping479
10.2.15 SetEndOfFile479
10.2.16 SetFilePointer479
10.2.17 UnlockFile480
10.2.18 UnlockFileEx480
10.2.19 UnmapViewOfFile481
10.3 文件的属性函数481
10.3.1 CompareFileTime481
10.3.2 DosDateTimeToFileTime481
10.3.3 FileTimeToDosDateTime482
10.3.4 FileTimeToLocalFileTime482
10.3.5 FileTimeToSystemTime482
10.3.6 GetBinaryType483
10.3.7 GetFileAttributes483
10.3.8 GetFileInformationByHandle493
10.3.9 GetFileSize494
10.3.10 GetFileTime494
10.3.11 GetFileType497
10.3.12 GetFileVersionInfo497
10.3.13 GetFileVersionInfoSize498
10.3.14 GetFullPathName498
10.3.15 GetTempFileName499
10.3.16 SetFileAttributes500
10.3.17 SetFileTime501
10.3.18 SystemTimeToFileTime503
10.3.19 VerLanguageName503
10.3.20 VerQueryValue503
10.4 文件的操作函数504
10.4.1 CopyFile504
10.4.2 DeleteFile505
10.4.3 FindClose505
10.4.4 FindFirstFile508
10.4.5 FindNextFile509
10.4.6 hread509
10.4.7 hwrite509
10.4.8 lread510
10.4.9 lwrite510
10.4.10 MoveFile, MoveFileEx510
10.4.11 ReadFile511
10.4.12 ReadFileEx512
10.4.13 SearchPath512
10.4.14 VerFindFile513
10.4.15 VerInstallFile513
10.4.16 WriteFile515
10.4.17 WriteFileEx516
10.5 压缩文件函数516
10.5.1 GetCompressedFileSize516
10.5.2 GetExpandedName517
10.5.3 LZClose517
10.5.4 LZCopy519
10.5.5 LZInit520
10.5.6 LZOpenFile520
10.5.7 LZRead520
10.5.8 LZSeek521
10.6 目录函数521
10.6.1 CreateDirectory, CreateDirectoryEx521
10.6.2 GetCurrentDirectory522
10.6.3 GetSystemDirectory522
10.6.4 GetTempPath523
10.6.5 GetVolumeInformation524
10.6.6 GetWindowsDirectory525
10.6.7 RemoveDirectory525
10.7 驱动器函数525
10.7.1 GetDiskFreeSpace525
10.7.2 GetDiskFreeSpaceEx527
10.7.3 GetDriveType528
10.7.4 GetLogicalDrives529
10.7.5 GetLogicalDriveStrings530
10.7.6 SetVolumeLabel533
10.8 注册表简介536
10.9 注册表的创建和存取函数540
10.9.1 RegCloseKey540
10.9.2 RegConnectRegistry540
10.9.3 RegCreateKey540
10.9.4 RegCreateKeyEx541
10.9.5 RegOpenKey542
10.9.6 RegOpenKeyEx542
10.9.7 RegSaveKey543
10.10 注册表项目的操作545
10.10.1 RegDeleteKey545
10.10.2 RegDeleteValue545
10.10.3 RegEnumKey545
10.10.4 RegEnumKeyEx546
10.10.5 RegEnumValue548
10.10.6 RegFlushKey548
10.10.7 RegGetKeySecurity549
10.10.8 RegLoadKey549
10.10.9 RegNotifyChangeKeyValue550
10.10.10 RegQueryInfoKey551
10.10.11 RegQueryValue552
10.10.12 RegQueryValueEx552
10.10.13 RegReplaceKey553
10.10.14 RegRestoreKey554
10.10.15 RegSetKeySecurity554
10.10.16 RegSetValue554
10.10.17 RegSetValueEx555
10.10.18 RegUnLoadKey555
10.11 INI文件函数560
10.11.1 GetPrivateProfileInt561
10.11.2 GetPrivateProfileSection562
10.11.3 GetPrivateProfileString562
10.11.4 GetProfileInt563
10.11.5 GetProfileSection564
10.11.6 GetProfileString564
10.11.7 WritePrivateProfileSection565
10.11.8 WritePrivateProfileString566
10.11.9 WriteProfileSection566
10.11.10 WriteProfileString567
10.12 设备控制函数567
10.12.1 DeviceIoControl567
10.12.2 QueryDosDevice571
10.12.3 SetHandleCount572
10.13 综合示例572
第11章 Windows消息函数589
11.1 消息函数589
11.1.1 BroadcastSystemMessage589
11.1.2 GetMessagePos591
11.1.3 GetMessageTime591
11.1.4 PostMessage, PostMessageBynum, PostMessageBystring591
11.1.5 PostThreadMessage602
11.1.6 RegisterWindowMessage603
11.1.7 ReplyMessage603
11.1.8 SendMessage, SendMessageBynum, SendMessageByString603
11.1.9 SendMessageCallback605
11.1.10 SendMessageTimeout605
11.1.11 SendNotifyMessage606
11.2 综合示例607
第12章 网络和Internet函数614
12.1 网络函数614
12.1.1 WNetAddConnection614
12.1.2 WNetAddConnection2616
12.1.3 WNetAddConnection3622
12.1.4 WNetCancelConnection622
12.1.5 WNetCancelConnection2623
12.1.6 WNetCloseEnum623
12.1.7 WNetConnectionDialog626
12.1.8 WNetDisconnectDialog626
12.1.9 WNetEnumResource626
12.1.10 WNetGetConnection627
12.1.11 WNetGetLastError627
12.1.12 WNetGetUniversalName628
12.1.13 WNetGetUser629
12.1.14 WNetOpenEnum629
12.2 Internet函数630
12.2.1 Internet的相关概念630
12.2.2 Internet函数简介633
12.3 Winsock函数635
12.3.1 Windows Sockets规范简介635
12.3.2 Winsock函数简介637
12.4 综合示例639
第13章 进程和线程函数680
13.1 进程和线程简介680
13.1.1 多任务、进程与线程680
13.1.2 线程的同步681
13.2 进程和线程操作函数682
13.2.1 CreatProcess682
13.2.2 ExitProcess684
13.2.3 FindExecutable685
13.2.4 FreeLibray686
13.2.5 GetCurrentProcess686
13.2.6 GetCurrentProcessId691
13.2.7 GetCurrentThread692
13.2.8 GetExitCodeProcess692
13.2.9 GetExitCodeThread693
13.2.10 GetModuleFileName693
13.2.11 GetModuleHandle694
13.2.12 GetPriorityClass695
13.2.13 GetProcessShutdownParameters695
13.2.14 GetProcessTimes695
13.2.15 GetProcessWorkingSetSize696
13.2.16 GetSartupInfo696
13.2.17 GetThreadPriority696
13.2.18 GetTheardTimes697
13.2.19 GetWindowThreadProcessId697
13.2.20 LoadLibrary699
13.2.21 LoadLibraryEx701
13.2.22 LoadModule702
13.2.23 SetPriorityClass702
13.2.24 SetProcessShutdownParameters703
13.2.25 SetProcessWorkingSetSize703
13.2.26 SetThreadPriority703
13.2.27. ShellExecute704
13.2.28 TerminateProcess704
13.2.29 WinExec705
13.3 同步函数705
13.3.1 DuplicateHandle705
13.3.2 GetHandleFormation706
13.3.3 MsgWaitForMultipleObjects707
13.4 综合示例708
第14章 多媒体函数734
14.1 音频函数734
14.1.1 PlaySound734
14.1.2 sndPlaySound735
14.2 AVI文件736
14.2.1 AVI数字视频的格式736
14.2.2 AVI数字视频的特点737
14.2.3 AVI采用的压缩算法738
14.3 MCI命令字符串接口738
14.4 多媒体程序实例744
附 录771
附录A 虚拟键码771
附录B 扬声器发音频率775
附录C 可用代码页列表776
附录D 结构定义776
D.1 BITMAP776
D.2 CPINFO777
D.3 DEVMODE777
D.4 FILETIME778
D.5 FORM_INFO_1779
D.6 LOGBRUSH779
D.7 LOGPEN780
D.8 MENUITEMINFO780
D.9 MONINTOR_INFO_2782
D.10 NETRESOURCE783
D.11 OSVERSIONINFO784
D.12 POINTAPI784
D.13 PROVIDOR_INFO_1785
D.14 RECT785
D.15 RGNDATA785
D.16 SYSTEM_INFO786
D.17 SYSTEMTIME787
D.18 TIME_ZONE_INFORMATION788
D.19 WINDOWPLACEMENT789
D.20 XFORM789