Самоучитель Visual C++ 6 в примерах [1ое издание]

Книга Самоучитель Visual C++ 6 в примерах, написанная авторами множества бестселлеров Стивеном Гилбертом и Биллом Маккар

289 33 42MB

Russian Pages 484 Year 2002

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Самоучитель Visual C++ 6 в примерах [1ое издание]

  • Commentary
  • 44044
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

С

С.Ги е , Б.М и А ЧИ VISUAL C++ 6 чи е ь Visual C++ 6 и е х,

И

АХ

, Visual C++ 6 Microsoft Foundation Classes (MFC). , , CD-ROM, Windows-

Windows API,

. MFC. ,

, ,

" (DocView),

, -

" .

Web, ActiveX. , -

.

Microsoft.

1.

:

8 12

Windows:

13 15 16 25 28 30 33 35 36 39 41

VC++ VC++ NotePod: AppWizard NotePod : Windows DOS

2. , ,

?

Windows

API Windows: MFC MFC 3. Dialog Editor Bitmap Editor Dialog Editor

51 58 59 60 65 68 74 86

4.

87 88 92 101 108 110 111

FourUp :

: ClassWizard:

5.

Dialog Editor BN_CLICKED OnDealCards() : ! 6. CWnd CStatic CButton 7.

: LineOne LineTwo Windows

PaintItGray 8. Windows GDI CDC GDI CDC ? 9.

:

1 2

PaintORama PaintORama:

10. 3

, PaintORama: PaintORama: PaintORama:

...

112 113 119 121 124 127 132 133 134 139 144 151 152 153 156 159 164 166 168 170 172 173 174 177 178 187 188 192 193 194 206 213 214 215 223

: 11. PaintORama:

WM_PAINT

SDIOne:

DocView

12. ,

DocView

? DocView: CSDIOneApp: ? 13.

? InitInstance()? :

MiniSketch ?

MiniSketch ? 14.

,

15.

MiniSketch:

Shape Minisketch ? 16.

: ?

:

17.

:

MiniSketch : WordZilla WordZilla ActiveX

233 235 237 245 252 254 255 257 265 272 273 274 278 285 293 294 295 299 300 306 316 317 319 321 326 328 331 334 338 339 340 342 345 349 353 354 361 362 364 364 368 372 380

18. ActiveX WordZilla

,

381 383 389 392 397 404 406 407

ActiveXDatePicker ActiveX 19.

:

409 410 417 423 428 429 430 431 434 440 445 447 455 456 457 459 466 469 477 481 482 483 484

ODBC OBos DAO OLE DB : ActiveX "

"

20. ? DAO : SQL ActiveX

Э

ActiveX DBExplore - Web 21. HTMLView

Internet:

:

HTML WinInet ... CD-ROM

299 DocView 255 236 319, 432

40 364 464 57 149

14 52 457

176 60 422

432 174 326 21 ClassView 26 Document Template Strings 21 Window Styles 21 431 93 67, 94 IDR_MAINFRAME 67 JUNK 94 66 169 309 73 31, 73, 166 Brush 73, 166 Pen 166 Pencil 73 Text 74 WizardBar 31 166 (IDE)

13 169 GUI 36

17 52 271 331 432 166, 186 295 Box 325 CAboutDlg 26 CAboutDlg 102 CArray 247 CBDApp 56

CBDWindow 56 CBrush 184 CButton 144 CChildFrame 26 CColorDialog 215 CComboBox 195, 215 CDC 177 CDialog 102, 135 CDocument 260 CFormView 382 CFourUpApp 63, 95 CFourUpDlg 63, 103 CFrameWnd 52 CListBox 215 CMainFrame 26, 258, 394 CMetaFileDC 195, 237 CMSDoc 331 CMSStatusBar 311 CMSView 286 CNotePodApp 26 CNotePodDoc 26 CNotePodView 26 CPaintDC 158 CPaintORamaDlg 197, 238 CPen 179 CPickDateDlg 396 CSDIOneDoc 260, 262 CStatic 139 CString 123 CWinApp 100, 257 CWnd 101, 134, 389 CWZView 393 FilledShape 324 Line 323 MyWindowClass 46 Oval 325 Shape 320 Squiggle 324 303 MFC 329 432 271 14 90

65, 89, 364 14 CFourUpApp 98 174 431 319

SetFont() 138 SetTimer() 169 195, 227 383 392 168

224 270 271, 284, 298, 335 DECLARE_SERIAL() 335 IMPLEMENT_SERIAL() 335 ON COMMAND 284 ON_COMMAND() 271 ON COMMAND.RANGE 289 UPDATE_COMMAND_UI 298 281 331 24, 283 AppWizard 24, 62, 154 ClassWizard 121, 163, 283, 402 14 285 432 237, 242 57, 121, 129, 138, 167, 200, 242, 264, 266, 288 CalculateWinnings() 131 Create() 57 DealCards() 129 DeflateRect() 200 GetCheck() 150 GetClientRect() 200 InitInstance() 57, 266 InitPen() 288 KillTimer() 170 LineTo() 167 OnCancel() 121 OnPaint() 168, 242 Rectangle(). 167 Run() 264 SetCharFormat() 373 SelectStockObject() 167 SetCheck() 150

Windows 217 Win32 207 57, 247, 335 CArchive 335 CBDApp 57 CPoint 247 92 319

236 236 236 432 50 38

DOS 38 Windows 38, 39 95 39 431 177 39 333 73 Color 73 Drawing 73 65, 295, 300, 470 432 48 220 bool 199 int 199

166, 179, 211, 220, 285 179 354 289 432 223

403 334 43, 403 42 331 295 354

78 76 136

CBrushOne 187 CDaoRecordView 424 CPenOne 183 DocView 245 FourUp 88 LineTwo 159 PaintltGray 170 PaintORama 215 SDIOne 246 SuperSaver 188

220 179 431 295, 306 432 432 195, 207 431 149 Windows 169 bool 168 319

MiniSketch 275, 364 PaintORama 194, 206 SquaresAndCircles 166 42

422

LineOne 154

320 284

125 50

65

319 319

319 224 API 46 MFC 355

76 16 46 14 278 68 14, 108 175, 349 187 431, 440 90 27 Windows 60 88

AddDocTemplate() 269 AddPoint() 262 CalculateWinnings() 131 CFourUpApp::InitInstance() 99 Close() 242 Create() 138 CreateObject() 270 CreateSolidBrush() 185 CreateWindow() 46 CSuperSaverApp::InitInstance() 189

CWnd::Create() 135 CWnd::lnvalidate() 162 DealCards() 130 DeflateRect() 200 DispatchMessage() 49 DoDataExchange() 103, 385, 390 DoModal() 288, 376, 391, 422 DPtoLP() 351 Draw() 320, 345 Drawltem() 314 Drawline() 174 DrawShape() 227, 241 DrawShapes() 225 EndDialog() 391 Fopen() 176 Fputc() 176 GetCharFormatSelection() 376 GetClientDC() 205 GetDlgltem() 200 GetFirstView() 261 GetMessage() 48 GetNextView() 261 GetRuntimeClass() 270 GetWindowRect() 200 InitInstance() 98, 100, 265 lnvalidate() 168 LineTo() 159 LoadStdProfileSettings() 267 LPtoDP() 351 Main() 41 MessageBox() 122 MoveTo() 158, 205 OnAppAbout() 265 OnAppExit() 272 OnBeginPrinting() 264, 355 OnBrushColor() 342 OnBrushcolor() 232 OnCancel() 122, 123, 391 OnCharEffects() 376 OnClearbtn() 243 OnDealCards() 124 OnDraw() 252, 277, 347 OnEditPasteDate() 387 OnEndPrinting() 264, 355

OnFormatFont() 375 OnInitDialog() 105, 169, 200, 220 OnLButtonDown() 203, 204, 222, 251,343 OnLButtonUp() 227, 344 OnMouseMove() 205, 226, 227, 344 OnNewFile() 405 OnOK() 391, 405 OnPaint() 107, 156, 233 OnPencolor() 220 OnPensColor() 287 OnPensWidth() 292 OnPrepareDC() 355 OnPreparePrinting() 264, 355 OnPrint() 355 OnQueryDragIcon() 108 OnSysCommand() 106 OnTimer() 170, 190 PaintBrushPreview() 233 PickRandomCard() 130 PlayMetaFile() 242 Printf() 174 PtlnRect() 204 Putch() 174 Putpixel() 174 Rectangle() 164 RegisterClass() 46 ScreenToClient() 200 Serialize() 335 SetDialog kColor() 189 SetIcon() 130 SetPos() 211 SetRange() 211 SetRegistryKey() 268 ShowWindow() 47 TextOut() 176 TranslateMessage() 49 Update() 347 UpdateData() 390 WinMain() 45, 47, 53 WndProc() 45, 50, 53

169 X 188 179 269 179 Э

Э

Э

65, 83, 89, 114, 200 CButton 89 CComboBox 90 CEdit 90 CListbox 90 CScrollBar 90 CStatic 89, 114 IDC_CANVAS 200 Picture 83 ActiveX 398, 445

(SQL) 408

A ActiveX 381 ADO 18 API 46 AppWizard 14, 20, 22, 30, 62, 154 AutoCompletion 33 B Bitmap Editor 68 C CEditView 24 ClassView 26 ClassWizard 30, 121, 125, 163, 210, 283, 402 COM 19, 41 Control Toolbar 65 D DAO 408, 434

DBos 425 DDV 103 DDX 103 Dialog Editor 65, 113 Dialog Toolbar 77 DLL 22 DocView 245, 255 DOS 38 DSN 408 F FIFO 42 FourUp 88 G GDI 40, 156 GetStockObject() 178 GUI 36, 274 H HTML 33, 457 I IDE 13 ISAM 410 ISR 42 M MDI 18, 256 Menu Editor 278 MFC 22, 23, 36, 51, 52, 53 MiniSketch 364 MRU 21 MSDN 33 MSG 43 MVC 236 N NotePod 15, 22, 24, 28, 63 O ODBC 408, 410 OLE 18, 41 OLE DB 428 P Pascal 25 R RC108 Resource Editor 108 ResourceView 27 ResourceView ( ) 27

S SDI 17, 255 SQL 408, 440 T Tip Wizard 14 Toolbar Editor 301 Ter 462 V Visual C++ 14, 408, 409 W

Web457 Web462z Window Styles 21 Windows 38, 39 Windows Message 43 Windows Notepad 15 Winlnet 477 WizardBar 31 WordZilla 368, 383