Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Visual C++ 6 in 21 Days. Teach Yourself - Chapman D..pdf
Скачиваний:
28
Добавлен:
24.05.2014
Размер:
5.81 Mб
Скачать

INDEX

Symbols

A

FlexGrid

 

 

 

 

cell IDs, 189

& (ampersand), 31

AbortDoc function, 657

loading data into,

188-189

address-of operator,

About window, editing, 23

random data generation,

554-555

ABOVE_NORMAL thread

189-191

binary AND (&), 51-53

priority, 432

sorting, 192-193

logical AND (&&), 51

accelerators

Internet Explorer support,

= (equal sign), 43, 549

creating, 118-119

522

* (asterisk)

defined, 107

licensing issues, 184, 196,

indirection operator, 554

restrictions, 119

477

multiplication operator, 549

Web Browser application,

methods, 475-476

{ } (braces), 546

532

properties

// (double slashes), 545

Accept function, 501

adding, 475

>> (extraction operator), 548

accessing

ambient, 474

| (pipe character)

field values, 353-354

custom, 474

binary OR (|), 52-53

structures, 561

extended, 474

logical OR (||), 52

ActiveX controls

registering

<< (redirection operator), 546

adding to dialogs, 186-187

Registered ActiveX

:: (scope operator), 568

automation, 181

Controls folder,

. (structure member

COM, 180-181

184-186

operator), 561

containers, 182-183

regsvr32 utility, 183

~ (tilde), 564

defined, 180, 474

Squiggle

 

event handling, 193-194,

 

CModArt class, 478-481

 

476

 

control shell, 477-478

 

 

732 ActiveX controls

event handling, 486-487

ADO_NUMERIC

ALTDRAG toolbar control

events, 489-491

_ENTRY, 355

style, 250

methods, 487-489

ADO_VARIABLE

ambient properties, 474

properties, 481-483

_LENGTH_ENTRY,

ampersand (&), 31

property page, 483-485

355-356

address-of operator,

testing, 491-492

BEGIN_ADO

554-555

see also ADO

_BINDING, 354

binary AND (&), 51-53

ActiveX Data Objects, see

END_ADO_BINDING,

logical AND (&&), 51

ADO

354

AND operators

Add Member Function dialog

Parameter object, 346

binary AND (&), 51-53

box, 18

pointers, 364

logical AND (&&), 51

Add Member Variable dialog

records

ANSIOTROPIC mapping

box, 32

adding, 357, 373-374

mode, 156

Add Property dialog box, 475

creating, 374-375

appendOnly flag (recordsets),

Add function, 701

custom record classes,

318

AddHead function, 703

361-364

applications

Adding a Class dialog

deleting, 357, 375-376

controls

box, 113

saving, 370-371

adding, 27-30

AddLine function, 206

updating, 356

functions, 35

AddNew function, 320, 357,

recordsets

initialization code, 33-35

374

accessing, 353-354

tab order, 30-31

AddNewRecord function, 296

closing, 357

variables, 32-33

address-of operator (&),

navigating, 352-353,

flow, tracking, 685-687

554-555

371-372

menus

AddString function, 264

RecordSet object, 346

accelerators, 107,

AddTail function, 703

see also DbAdo application

118-119

ADO (ActiveX Data Objects),

ADO_FIXED_LENGTH

attaching, 112

344-345

_ENTRY macro, 355

cascading, 106

clean-up functions, 367

ADO_NUMERIC_ENTRY

context menus, 106,

command execution, 351

macro, 355

116-118

Command object, 345-346

ADO_VARIABLE_LENGTH

creating, 109-110

Connection object, 345

_ENTRY macro, 355-356

event handling, 112-115

database connections

AfxBeginThread function,

hotkeys, 107

closing, 357

432-433, 468

naming, 119

creating, 350-352,

AfxGetStaticModuleState

pull-down menus, 106

365-366

function, 409

separator lines, 111

DLLs, importing, 349-350

AFX_EXT_CLASS macro,

Windows conventions,

error handling, 364

408

107

Error object, 345

AFX_MANAGE_STATE

Multiple Document

Field object, 346

macro, 409

Interface, see MDI

forms, populating, 367-369

aligning objects, 450-452

applications

macros

combo boxes, 263

project workspace, creating,

ADO_FIXED_LENGTH

toolbars, 251

11-12

_ENTRY, 355

 

resource files, 108

 

 

running, 543-544

buttons 733

Single Document Interface,

B

browsers

 

see SDI applications

 

Internet Explorer

toolbars, 244-245

Back button (browser appli-

ActiveX document

attaching to application

model, 522

cation), 531

frames, 247-249

controlling, 524

BeginWaitCursor function, 63

borders, 251

navigation functions,

BEGIN_ADO_BINDING

buttons, 245, 252-253

523-524

macro, 354

child window IDs, 251

status, 524

BELOW_NORMAL thread

creating, 246, 250

WebBrowse application

priority, 432

docking, 253-254

application shell, 525

binary operators

hiding, 254-256

Back button, 531

AND (&), 51-52

loading, 250

displaying URLs,

attribute flags, 52-53

naming, 247

529-530

OR (|), 52

styles, 250-251

Forward button, 531

bItalic argument (CreateFont

views, 8

Refresh button, 533-535

function), 127

see also names of individual

specifying URLs,

BitBlt function, 155

applications; listings

526-528

bitmaps

AppWizard

Stop button, 532-533

copying, 155

application frameworks,

browsing code (Source

displaying, 174-176

creating, 12-14

Browser)

loading, 155

printing/previewing, 637

base classes, 682

LoadBitmap function,

arguments, passing by

Call Graph option, 683

172

reference, 557-558

Callers Graph option, 683

LoadImage function,

arithmetic operators, 549

derived classes, 683

172

arrays

File Outline option, 682

OnBbitmap function,

classes, 700-702

for definitions/references,

173-174

Spinner application,

681

resizing, 155

449-450

identifiers, 681

variables, 173

threads, 433

brushes

Black menu (SDI drawing

aspect ratio

creating, 153

application), 224

controlling, 645-647

patterns, 154

Blue menu (SDI drawing

fax machines, 645

selecting, 153

application), 224-225

printers, 645

Build toolbar, 10

borders (toolbars),

ASSERT macro, 687-689

bUnderline argument

sizing, 251

assignment operator (=), 549

(CreateFont function), 127

BottomRight function, 712

attaching

button combination IDs

braces ({}), 546

menus, 112

(MessageBox function), 85

breakpoints, 685

toolbars to application

buttons

setting, 689-690

frames, 247-249

adding to toolbars, 245

toggling on/off, 690

attribute flags (binary

Exit, creating, 36-37

Breakpoints dialog box, 690

operations), 52-53

icons, 246

 

AUTOHSCROLL combo box

 

maximize/minimize, 21-22

style, 263

 

radio buttons, 27

automation, 181

 

 

734 buttons

removing from toolbars, 245

Run Program, 42-43 styles, 252-253 text, 276

WebBrowse application Back, 530-532 Forward, 530-532 Refresh, 533-535 Stop, 532-533

C

cache, 704-706 CalcPoint function, 451 calculating

cell IDs, 189

object positions, 450-452 call stack

size, 433 viewing, 693-694

Call Stack window (debugger), 694

callback functions, 72, 122 canceling print jobs, 657 canvases (graphics), creating,

160 captions, 110 capturing

keyboard events, 57-62 mouse events

OnLButtonDown function, 56

OnMouseMove function, 49-50, 54-55

CArchive class, 280 CArchiveException class,

671-672

cascading menus, 106 CAsyncSocket class, see

sockets

catch keyword, 663-664

catching exceptions, 661-666

CBS_NOINTEGRAL-

blanket exception catch, 665

HEIGHT combo box style,

catch keyword, 663-664

264

multiple exceptions,

CBS_OEMCONVERT combo

664-665

box style, 264

try keyword, 663-664

CBS_OWNERDRAWFIXED

CBitmap class, 154-156

combo box style, 264

CBRS_ALIGN_ANY toolbar

CBS_OWNERDRAWVARI-

style, 251-253

ABLE combo box style, 264

CBRS_ALIGN_BOTTOM

CBS_SIMPLE combo box

toolbar style, 251-253

style, 264

CBRS_ALIGN_LEFT toolbar

CBS_SORT combo box style,

style, 251-253

264

CBRS_ALIGN_RIGHT

CByteArray class, 700

toolbar style, 251-253

CChildFrame class, 231

CBRS_ALIGN_TOP toolbar

CCriticalSection class, 436

style, 251

CDAOException class,

CBRS_BORDER_BOTTOM

672-673

toolbar style, 251

CDbAdoDoc class

CBRS_BORDER_LEFT

AddNew function, 374

toolbar style, 251

CreateBlankRecord func-

CBRS_BORDER_RIGHT

tion, 374-375

toolbar style, 251

Delete function, 376

CBRS_BORDER_TOP

DeleteContents function,

toolbar style, 251

367

CBRS_FLOAT_MULTI

GenerateError function, 365

toolbar style, 251-253

GetRecSet function, 364

CBRS_FLYBY toolbar style,

OnNewDocument function,

251

366

CBRS_GRIPPER toolbar

CDbAdoView class

style, 251

MoveFirst function, 372

CBRS_TOOLTIPS toolbar

OnDataFirst function, 371

style, 251

RefreshBoundData function,

CBrush class, 153-154

368-369

CBS_AUTOHSCROLL

UpdateBoundData function,

combo box style, 263

370-371

CBS_DISABLENOSCROLL

CDBException class, 672-673

combo box style, 264

CDbOdbcSet constructor, 331

CBS_DROPDOWN combo

CDocument class, 200

box style, 263

CDWordArray class, 700

CBS_DROPDOWNLIST

CEditView class, 201

combo box style, 264

cell IDs (FlexGrid control),

CBS_HASSTRINGS combo

calculating, 189

box style, 264

CenterPoint function, 713

classes 735

CEvent class, 440

CDbAdoDoc

CLine

CException class

AddNew function, 374

color, 218-219

Delete function, 668

CreateBlankRecord

constructor, 204-205

extending, 675-676

function, 374-375

creating, 203

GetErrorMessage function,

Delete function, 376

drawing, 205

668-669

DeleteContents function,

header file, 216

ReportError function, 669

367

serialization, 217

CFileDialog class

GenerateError function,

CListView, 201

properties, 102

365

CMainFrame, 231

sample application

GetRecSet function, 364

CreateColorbar function,

DoModal function, 91

OnNewDocument func-

261-262

GetFileName function,

tion, 366

message map, 268

92

CDbAdoView

OnCreate function,

OnFileopen function,

MoveFirst function, 372

248-249, 265-266

90-91

OnDataFirst function,

OnSelChangeWidth

CFileException class, 667,

371

function, 267

670-671

RefreshBoundData

OnUpdateViewColorbar

CFormView class, 201

function, 368-369

function, 255

CFrameView class, 200

UpdateBoundData

OnViewColorbar func-

changing, see editing

function, 370-371

tion, 256

char data type, 548

CDBException, 672-673

UpdateWidthCB func-

check boxes, 27

CDocument, 200

tion, 269

CHtmlView class, 201

CDWordArray, 700

CMapPtrToPtr, 704

browser controls, 524

CEditView, 201

CMapPtrToWord, 704

browser status, 524

CEvent, 440

CMapStringToOb, 704

navigation functions,

CException

CMapStringToPtr, 704

523-524

Delete function, 668

CMapStringToString, 705

circles, drawing, 168-171

extending, 675-676

CMapWordToOb, 704

Class View, 8

GetErrorMessage func-

CMapWordToPtr, 704

Class Wizard

tion, 668-669

CMemoryException, 669

Member Variables tab, 32

ReportError function,

CModArt, see CModArt

Message Maps tab, 34

669

class

classes

CFileDialog, 90-92

CMutex, 436

CArchive, 280

CFileException, 667,

CMyCustomClass*, 707

CArchiveException,

670-671

CNotSupportedException,

671-672

CFormView, 201

674

CBitmap, 154-156

CFrameView, 200

CObArray, 205, 700

CBrush, 153-154

CHtmlView, 201

CObList, 702

CByteArray, 700

browser controls, 524

COleDispatchException,

CChildFrame, 231

browser status, 524

673-674

CCriticalSection, 436

navigation functions,

COleException, 673-674

CDAOException, 672-673

523-524

collection classes, 699-700

 

 

array classes, 700-702

 

 

customizing, 707-710

736 classes

list classes, 702-704

source file, 450

objects, adding, 708-709

map classes, 704-706

SuspendSpinner func-

serializable classes, 283-284

type-safety, 707-710

tion, 462-463, 470-471

string manipulation class,

constructors, 564

ThreadFunc function,

724

CPen, 151-153

461, 470

adding text, 725

CPerson, 288

CTaskingView

case sensitivity, 727

constructor, 290

OnCbthread1 function,

constructor types, 724

inline functions,

464

formatting, 728-729

289-290

OnCbthread2 function,

manipulation functions,

serializing, 291-294

465

727

variables, 289

OnDestroy function, 467

NULL-terminated types,

CPoint class, 712

CTestAppDoc

726

CPrintDialog, 653

declaration, 423-424

searches, 727-728

CPtrArray, 700

DeleteContents function,

size, 725

CPtrList, 702

425

time-handling classes,

CRecordset

GetDrawing function,

718-719

database connections,

425

COleDateTime class,

317

OnNewDocument func-

719-722

editing functions,

tion, 424

COleDateTimeSpan

320-321

Serialize function, 425

class, 722-724

recordset navigation,

CTestAppView, 425-426

formatting code,

319-320

CToolbarDoc

720-721

CRect class, 712-717

message map, 274

ClearDrawing function, 391

CResourceException, 670

UpdateColorbar func-

clearing

CRichEditView, 201

tion, 269-270

drawings

CScrollView, 201

CTreeView, 201

ClearDrawing function,

CSemaphore, 438

CUIntArray, 700

391

CSize class, 717-718

CUserException, 674

ModArtClearDrawing

CSpinner

CView, 200

function, 421

color table, 445-446

CWinApp, 200

message box text, 38-39

constructor, 444

CWordArray, 700

CLine class

declaration, 445

declaring, 385, 561-564

color, 218-219

Draw function, 446-447

destructors, 564

constructor, 204-205

source file, 449

device context, 151

creating, 203

variables, 443-444

encapsulation, 380

drawing, 205

CStringArray, 700

friend classes, 565

header file, 216

CStringList, 702

generic, 381-382

serialization, 217

CTaskingApp, 457-459

header files, 565-566

CListView class, 201

CTaskingDoc

inheritance, 380-381

clock timer

CalcPoint function, 451

Car class example,

OnInitDialog function,

DoSpin function, 455

572-576

71-72

InitSpinners function,

Human class example,

OnTimer function, 73

453

569-572

Close function, 319, 357, 503

OnNewDocument func-

nesting, 566-569

 

tion, 454-455, 469

 

 

Command object

737

closing

Serialize function, 390

color

applications, 36-37

SetRect function, 386

brushes, 153

database connections, 357

variables, 385

CModArt class color table,

recordsets

MFC DLL

392

ADO, 357

class declaration, 411

menus

ODBC, 319

NewLine function,

event handlers, 235

socket connections, 503,

411-416

troubleshooting, 240

517-519

testing, 413-414

pens, 152-153

CMainFrame class, 231

regular DLL, 416

SDI application

functions

header file, 417

color table specification,

CreateColorbar, 261-262

ModArtClearDrawing

219-220

OnCreate, 248-249,

function, 421-422

lines, 218-222

265-266

ModArtDraw function,

GetColor function, 222

OnSelChangeWidth, 267

421

specifying, 51

OnUpdateViewColorbar,

ModArtNewDrawing

Spinner application,

255

function, 418

445-446

OnViewColorbar, 256

ModArtSerialize func-

COM (Component Object

UpdateWidthCB, 269

tion, 421

Model), 180, 684

message map, 268

module definition file,

see also ActiveX controls

CMapPtrToPtr class, 704

422

combo boxes

CMapPtrToWord class, 704

NewLine function,

creating

CMapStringToOb class, 704

419-420

Create function, 263

CMapStringToPtr class, 704

project file, 417

CreateColorBar func-

CMapStringToString class,

CMutex class, 436

tion, 260-262

705

CMyCustomClass* class, 707

OnCreate function,

CMapWordToOb class, 704

CNotSupportedException

265-266

CMapWordToPtr class, 704

class, 674

styles, 263-264

CMemoryException class,

CObArray class, 205, 700

event handling

669

CObList class, 702

CMainFrame message

CModArt class, 478-480

code listings, see listings

map, 267-268

library module

CoInitialize function, 350

OnSelChangeWidth

ClearDrawing function,

COleDateTime class, 722

function, 267

391

COleDispatchException class,

placeholders, 262

color table, 392

673-674

populating, 264

constructor, 391

COleException class, 673-674

positioning, 263

creating, 385

Collate check box (Print

resource files, editing,

Draw function, 390

dialog box), 651

257-260

#include directives, 392

collection classes, 699-700

sizing, 276

NewDrawing function,

array classes, 700-702

updating, 268-270

389, 397-398

customizing, 707-710

command buttons, see

NewLine function, 386,

list classes, 702-704

buttons

399

map classes, 704-706

COMMAND function, 227

rand function, 388

type-safety, 707-710

Command object, 345-346

738 commands

commands

Connect function, 500

properties

Control menu, Invoke

Connection object, 345

adding, 475

Methods, 492

constructors

ambient, 474

Edit menu, Insert New

declaring, 564

custom, 474

Control, 491

default, 564

extended, 474

executing, 351

defined, 564

registering

Layout menu, Tab Order, 30

naming, 564

Registered ActiveX

regsvr32, 184

return values, 564

Controls folder,

see also statements

containers, 182-183, 700-702

184-186

CommandToIndex function,

context menus

regsvr32 utility, 183

252

creating, 116, 236-238

Squiggle

comments, 545

Menu Designer, 237-238

CModArt class, 478-481

common dialogs

OnContextMenu func-

control shell, 477-478

adding to applications,

tion, 117, 238-239

event handling, 486-487

90-92

TrackPopupMenu func-

events, 489-491

classes, 90

tion, 117-118

methods, 487-489

OnFileopen function, 91

WM_CONTEXTMENU

properties, 481-483

see also dialog windows

message, 237

property page, 483-485

Compare function, 726

defined, 106

testing, 491-492

CompareNoCase function,

designing, 116

controls (Visual Basic compo-

726

event handling, 116

nents), 25-26

compiler

CONTEXTMENU event, 116

adding to applications,

configuration modes, 678

Control menu commands,

27-30

#import directive, 349-350

Invoke Methods, 492

buttons, 27

#include directive, 97

control styles (toolbars), 250

Exit, 36-37

CModArt, 392

controls (ActiveX)

Run Program, 42-43

CModArt class, 392

adding to dialogs, 186-187

check boxes, 27

CTestAppDoc, 394, 414

automation, 181

drop-down list boxes, 27

DbAdo application, 364

COM, 180-181

edit boxes, 26

Graphics application,

containers, 182-183

clearing text, 38-39

162

defined, 180, 474

disabling, 39-41

Hello, World applica-

event handling, 193-194,

displaying text, 37-38

tion, 545

476

hiding, 39-41

SDI application, 213

FlexGrid

functions, 35

Sock application, 510

cell IDs, 189

initialization code, 33-35

Squiggle control, 481

loading data into,

mnemonics, 31

Component Object Model,

188-189

object IDs, 44-45

see COM

random data generation,

radio buttons, 27

components, see controls

189-191

static text, 26

conditional statements, 549

sorting, 192-193

tab order, specifying, 30-31

configuring

Internet Explorer support,

variables, assigning, 32-33

combo box placeholders,

522

converting DLLs for non-C++

262

licensing issues, 184, 196,

applications, 427-428

compiler modes, 678

477

cooperative multitasking, 430

ODBC data sources,

methods, 475-476

 

322-323

 

 

customizing 739

coordinate handling classes,

CreateFont function

CStringArray class, 700

710

alternatives to, 139

CStringList class, 702

CPoint class, 712

arguments

CTaskingApp class, 457-459

CRect class, 712-717

bItalic, 127

CTaskingDoc class

CSize class, 717-718

bUnderline, 127

functions

Offset function, 712

cStrikeOut, 127

CalcPoint, 451

operator overloads, 711-712

lpszFacename, 129

DoSpin, 455

coordinate systems

nCharSet, 127-128

InitSpinners, 453

aspect ratio, 645

nClipPrecision, 128

OnNewDocument,

mapping modes, 156

nEscapement, 126

454-455, 469

copying bitmaps, 155

nHeight, 126

SuspendSpinner,

CoUninitialize function, 350

nOrientation, 126

462-463, 470-471

counting lines, 207-208

nOutPrecision, 128

ThreadFunc, 461, 470

counting timer

nPitchAndFamily, 129

source file, 450

control variables, 74-75

nQuality, 128

CTaskingView class

functions

nWeight, 126-127

OnCbthread1 function, 464

OnChangeInterval, 75

nWidth, 126

OnCbthread2 function, 465

OnInitDialog, 76

declaring, 125

OnDestroy function, 467

OnTimer, 77-79

example, 125

CTestAppDoc class

starting, 76-77

CreateHatchBrush function,

declaration, 423-424

Stop button, 79-81

655

document functions

stopping, 77

CreateInstance function, 350

DeleteContents, 425

CPen class, 151-153

CreateProcess function, 44

GetDrawing, 425

CPerson class, 288

CRecordset class

OnNewDocument, 424

constructor, 290

database connections, 317

Serialize, 425

inline functions, 289-290

recordsets

CTestAppView class, 425-426

serializing

closing, 319

CToolbarDoc class

DECLARE_SERIAL

editing, 320-321

message map, 274

macro, 292

navigating, 319-320

UpdateColorbar function,

IMPLEMENT_SERIAL

opening, 317-318

269-270

macro, 293-294

CResourceException class,

CTreeView class, 201

Serialize function,

670

CUIntArray class, 700

291-292

CRichEditView class, 201

cursors, changing, 59

variables, 289

CScrollView class, 201

CUserException class, 674

.cpp file extension, 565

CSemaphore class, 438

custom properties, 474

CPrintDialog class, 653

CSpinner class

CUSTOMERASE toolbar

CPrintInfo function, 642

color table, 445-446

control style, 250

CPtrArray class, 700

constructor, 444

customizing

CPtrList class, 702

declaration, 445

collection classes, 707-710

CreateBlankRecord function,

Draw function, 446-447

dialog windows, 93-96

374-375

source file, 449

header files, 96-98

CreateColorbar function,

variables, 443-444

variables, 99-100

261-262

cStrikeOut argument

Print dialog box, 652

CreateEx function, 250-251

(CreateFont function), 127

toolbars, 10, 245

740 CView class

CView class, 200-201 CWinApp class, 200 CWordArray class, 700

D

DAO (Data Access Objects), 672-673

data sources (ODBC), configuring, 322-323

data types declaring, 559 sizes, 554-555 values, 547-548

databases, 284 cache, 704-706

clean-up functions, 302, 367 command execution, 351 connections

DbAdo example, 365-366

closing, 357 ODBC, 317 opening, 350-351

data source configuration, 322-323

error handling, 364 exception classes

CDAOException, 672-673

CDBException, 672-673 opening, 351-352

position counters, 297-298 records

adding, 295-297, 331-334, 357, 373-374

class headers, 310 counting, 297 creating, 374-375 custom record class,

361-363

deleting, 334-335, 357, 375-376

displaying, 306-307 saving updates, 308-312,

370-371 updating, 356

recordsets

closing, 319, 357 editing, 320-321 navigating, 298-301,

307-308, 319-320,

352-353, 371-372 opening, 317-318 pointers, 364 types, 318

views, 285

resetting, 309-310 view class, 305-306

see also DbAdo application; DbOdbc application

date/time handling classes, 718-719

COleDateTime class, 719-722

COleDateTimeSpan class, 722-724

formatting code, 720-721

DbAdo application (ADO database)

#include directives, 364 application shell, 358

control properties, 359-361

control variables, 361 clean-up functions, 367 connecting to, 365-366 form, populating, 367-369 navigation

MoveFirst function, 372 OnDataFirst function,

371 pointers, 364 records

adding, 373-374 creating, 374-375 custom record class,

361-363

deleting, 375-376 error handling, 364

saving updates, 370-371

DbOdbc application (ODBC database)

application shell, 324-325 main form

CDbOdbcSet constructor, 331

control properties, 325-327

control variables, 328 Database field variables,

329 DoDataExchange func-

tion, 330 records

adding, 331-334 deleting, 334-335

Debug Assertion Failed dialog box, 687

Debug Info, 679 Debug mode, 678 debugger

call stack, viewing, 693-694 Disassembly toolbar, 694 Edit and Continue options,

692 windows

Memory, 694 QuickWatch, 694 Registers, 694 Variables, 692-694 Watch, 692-694

debugging techniques, 677

ASSERT macro, 687-689 breakpoints, 685

Debug mode, 678 just-in-time, 684 MFC Tracer tool, 698 networks, 685

OLE/COM Object Viewer tool, 697

options/levels, 679-681

dialog windows

741

Debugging Information

friends, 565

device contexts (graphics),

settings, 680-681

prototypes, 548

150-151

Generate Browse Info,

pointers, 554

bitmaps, 154-156

679

variables, 548

brushes

Preprocessor

DEF files, 408

creating, 153

Definitions, 680

default constructors, 564

patterns, 154

Project Options, 680

defined flags, 52

selecting, 153

warning levels, 679

DeflateRect function, 715

device contexts class, 151

Warnings as Errors, 679

Delete function, 320-321, 376,

modifying, 656

Process Viewer tool, 697

668

pens

remote debugging, 683-684

DeleteContents function, 214,

colors, 152-153

single stepping, 685

302, 367, 396, 425

creating, 151

breakpoints, 689-690

deleting

styles, 152

editing code, 692

drawings, 396

printing, 643-644

step options, 691-692

DeleteContents function,

DevMode structure, 652

Source Browser tool

425

dialog windows

base classes option, 682

SDI application, 214

ActiveX controls, adding,

Call Graph option, 683

exceptions, 668

186-187

Callers Graph option,

records

Add Member Function, 18

683

ADO, 357, 375-376

Add Member Variable, 32

Definitions and

ODBC, 321, 334-335

Add Property, 475

References option, 681

derivation, see inheritance

Adding a Class, 113

derived classes option,

deserialization, 280

breakpoints, 690

683

design

common dialogs

File Outline option, 682

classes

adding to applications,

identifiers, entering, 681

encapsulation, 380

90-92

Spy++ tool

form classes, 382

classes, 90

Messages view, 695-696

generic classes, 381-382

OnFileopen function, 91

Processes view, 697

inheritance, 380-381

creating, 15-17

Threads view, 697

MFC, 382

custom dialogs, 93-96

Windows view, 696

DLLs, 409

calling, 98

TRACE macros, 685-687

menus

header files, 96-98

variables, checking con-

context menus, 116

OnBcustomdialog func-

tents, 692-694

Windows conventions,

tion, 98-99

VERIFY macro, 687-689

107

OnBwhichoption func-

see also exceptions; trou-

destructors, 564

tion, 99

bleshooting

Developer Studio

reading variables,

DECLARE_SERIAL macro,

editor area, 9

99-100

282, 292

Output pane, 9

Debug Assertion Failed, 687

declaring

toolbars, 10

defined, 83

classes, 385, 561-564

workspace, 8

exception handling, 674

data types, 559

 

Graphics application

functions, 546-548

 

canvas dialog, 160-162

constructors, 564

 

main dialog, 157-160

destructors, 564

 

 

742 dialog windows

icons, 20-21

SDI application, 213

regular DLLs

Insert Control, 491

Sock application, 510

adapting functions,

Insert Resource, 109

Squiggle control, 481

421-422

Invoke Methods, 492

DISABLENOSCROLL

creating, 416-420

menus

combo box style, 264

DEF files, 408

attaching, 112

disabling, see turning on/off

export operations,

cascading, 106

Disassembly toolbar (debug-

408-409

context menus, 106

ger), 694

module definition files,

creating, 109-111

displaying

422

event handling, 112-115

bitmaps, 174-176

testing, 423-426

hotkeys, 107

current records, 306-307

see also library modules

pull-down menus, 106

current URL, 529-530

DockControlBar function,

Windows conventions,

drawings

254

107

Draw function, 390

docking toolbars, 253-254

message boxes

GetDrawing function,

Document/View architecture,

button combinations, 85

425

200-201

icons, 85

ModArtDraw function,

documents

MessageBox function,

421

opening

84

ModArtNewDrawing

OnNewDocument func-

OnYesnocancel func-

function, 418

tion, 303-304

tions, 88-89

message boxes, 37-38

OnOpenDocument func-

sample application,

processes, 697

tion, 304-305

86-88

threads, 697

printing, 647-650

Message Options, 695

toolbars, 254

DoDataExchange function,

ODBC Microsoft Access

OnUpdateViewColorbar

330

Setup, 323

function, 255

DoModal function, 90

Print

OnViewColorbar func-

DoPreparePrinting function,

accessing directly,

tion, 256

648

657-659

ShowControlBar func-

DoSort function, 192

bypassing, 649

tion, 255

DoSpin function, 455

Collate check box, 651

ShowWindow function,

double data type, 548

Project Settings, 678

255

Draw function, 390, 446-447

Select Database Tables, 325

DLLs (dynamic link

drawing areas

directives

libraries), 406-407

finding size of, 452

#import, 349-350

ADO, importing, 349-350

setting, 386

#include directives, 97

advantages, 406

drawings

CModArt, 392

designing, 409

circles, 168-171

CModArt class, 392

MFC DLLs

clearing, 390-391

CTestAppDoc, 394, 414

creating, 410-413

ClearDrawing function,

DbAdo application, 364

editing, 414-416

391

Graphics application,

export operations, 408

ModArtClearDrawing

162

test application, 413-414

function, 421

Hello, World applica-

non-Visual C++ applica-

 

tion, 545

tions, 427-428

 

events 743

creating

Draw function, 446-447 ModArtDraw function,

421 ModArtNewDrawing

function, 418 NewDrawing function,

389, 398-399 OnNewDocument func-

tion, 395 deleting, 396

DeleteContents function, 425

SDI application, 214 displaying

Draw function, 389-390 GetDrawing function,

396, 425

OnDraw function, 397, 426

lines

colors, 164-165 DrawLine function,

165-166 NewLine function,

386-388, 399-401,

411-416, 419-420 loading, 488-491 random, 388-389 rectangles, 168-171 rendering, 211-212 saving, 215-217, 395 serializing, 390 start/end points, 448-449 viewpoints, 448

see also color; graphics

DrawLine function, 165-166 DrawRegion function,

168-171

drop-down list boxes, 27, 264 DROPDOWN combo box

style, 263 DROPDOWNLIST combo

box style, 264

dynamic link libraries, see DLLs

dynamic record sets, 318 dynasets, 318

E

edit boxes, 26 disabling, 39-41 hiding, 39-41 text

clearing, 38-39 displaying, 37-38

see also message boxes

Edit function, 320 Edit menu

design conventions, 107 Insert New Control com-

mand, 491 editing

About window, 23 message box text, 22 recordsets, 320-321

editor area (Developer Studio), 9

Empty function, 725 EnableDocking function, 253 encapsulation, 380

EndDoc function, 659 EndPage function, 660 EndWaitCursor function, 63 END_ADO_BINDING macro,

354

enum statement, 571 EnumFontFamiliesEx func-

tion, 122-123 EnumFontFamProc function,

124

ENUMLOGFONTEX structure, 124

equal sign (=), 43, 549 Error object, 345

errors, see exceptions escapement (fonts), 126 event handling

ActiveX controls, 193-194 combo boxes

CMainFrame message map, 267-268

OnSelChangeWidth function, 267

Graphics application OnPaint function, 167,

171-172 OnRSelection function,

163-164 menus, 112

color menu, 235 COMMAND event, 114 context menus, 116 event-handler declara-

tions, 233-234 message maps, 234-235 OnExit function, 114 OnHello function,

113-114 OnHelpAbout function,

114-115

SDI application, 209-211 sockets, 503-504 Squiggle control, 485-487

event messages, see messages events

adding to ActiveX controls, 476

keyboard

GetKeyState function, 65

messages, 56-57 OnKeyDown function,

57-58, 61-62 virtual key codes, 65

mouse

drawing program, 49 messages, 48 OnLButtonDown func-

tion, 56

744 events

OnMouseMove function, 49-50, 54-55

tracking, 53-55 thread synchronization,

439-440 timers

clock timer, 71-73 counting timer, 74-81 defined, 68

IDs, 70-71 interval range, 81 maximum of, 81

exceptions

catching, 661-666

blanket exception catch, 665

catch keyword, 663-664 multiple exceptions,

664-665

try keyword, 207, 663-664

deleting, 668 defined, 661 MFC

CArchiveException class, 671-672

CDAOException class, 672-673

CDBException class, 672-673

CException class, 668-669

CFileException class, 667, 670-671

CMemoryException class, 669

CNotSupportedException class, 674

COleDispatchException class, 673-674

COleException class, 673-674

CResourceException class, 670

CUserException class, 674

generating custom, 675-676

sockets, 504

testing exception type, 665 throwing, 666-667

see also debugging techniques

executing commands, 351 Exit buttons, creating, 36-37 exporting

classes, 408 functions, 408-409

extended properties, 474 extraction operator (>>), 548

F

fax machines, 645 Field object, 346

fields, accessing, 353-354 file extensions

.cpp, 565

.h, 565

.hpp, 565

.rc, 108

File menus, designing, 107 File View, 8

files

DEF, 408

header files, 565-566 library modules, 402 ModArtDll, 417

resource files, 108

FillFontList function, 132-134 Find function, 727

FindIndex function, 704 FindOneOf function, 728 flags

binary operations, 52-53 defined, 52

TPM_CENTERALIGN, 118

TPM_LEFTALIGN, 118 TPM_LEFTBUTTON, 118 TPM_RIGHTBUTTON,

118

FLAT style toolbar control style, 250

flat-file databases application shell, 284-285 clean-up functions, 302 controls

properties, 286-287 variables, 287

defined, 284 documents

document class, 294-295 opening, 303-305

position counters, 297-298 record class header, 310 records

adding, 295-297 counting, 297 displaying, 306-307

recordsets

navigating, 298-301, 307-308

serializing, 301-302 saving changes, 308-309,

311-312

serializable classes, 288-289 constructors, 290 creating, 291-294

inline methods, 289-290 views, 285

view class, 305-306 resetting, 309-310

FlexGrid control cell IDs, 189

event handling, 193-194 loading data into, 188-189 random data, generating,

189-191 sorting, 192-193

functions 745

float data type, 548

OnInitDialog function,

CommandToIndex, 252

fonts

133-135

Compare, 726

CreateFont function

OnSelchangeLfonts

CompareNoCase, 726

alternatives to, 139

function, 138

Connect, 500

bItalic argument, 127

SetMyFont function, 137

constructors, 564

bUnderline argument,

form classes, 382

CoUninitialize, 350

127

Format function, 720

CPrintDialog class, 653

cStrikeOut argument,

formatting

CPrintInfo, 642

127

dates/time, 720-721

CreateBlankRecord,

declaring, 125

strings, 728-729

374-375

example, 125

forms, populating, 367-369

CreateColorbar, 261-262

lpszFacename argument,

Forward button (browser

CreateEx, 250-251

129

application), 531

CreateFont

nCharSet argument,

forwardOnly recordsets, 318

alternatives to, 139

127-128

frames, attaching toolbars to,

bItalic argument, 127

nClipPrecision argu-

247-249

bUnderline argument,

ment, 128

frameworks (MDI/SDI),

127

nEscapement argument,

printing, 637

cStrikeOut argument,

126

friend classes, 565

127

nHeight argument, 126

friend functions, 565

declaring, 125

nOrientation argument,

functions, 546

example, 125

126

AbortDoc, 657

lpszFacename argument,

nOutPrecision argument,

Accept, 501

129

128

Add, 701

nCharSet argument,

nPitchAndFamily argu-

AddHead, 703

127-128

ment, 129

AddLine, 206

nClipPrecision argu-

nQuality argument, 128

AddNew, 320, 357, 374

ment, 128

nWeight argument,

AddNewRecord, 296

nEscapement argument,

126-127

AddString, 264

126

nWidth argument, 126

AddTail, 703

nHeight argument, 126

listing available fonts

AfxBeginThread, 432-433,

nOrientation argument,

callback functions, 122

468

126

EnumFontFamiliesEx

AfxGetStaticModuleState,

nOutPrecision argument,

function, 123

409

128

EnumFontFamProc

BeginWaitCursor, 63

nPitchAndFamily argu-

function, 124

BitBlt, 155

ment, 129

TrueType fonts, 140

BottomRight, 712

nQuality argument, 128

sample application

CalcPoint, 451

nWeight argument,

application shell,

callback functions, 72, 122

126-127

129-131

CenterPoint, 713

nWidth argument, 126

font list, 131-132

ClearDrawing, 391

CreateHatchBrush, 655

OnChangeEsamptext

Close, 319, 357, 503

CreateInstance, 350

function, 136

CoInitialize, 350

CreateProcess, 44

 

COMMAND, 227

declaring, 546

746 functions

default access permissions,

GetDayOfWeek, 720

GetToPage, 653

292

GetDayOfYear, 720

GetTopLevelFrame, 270

DeflateRect, 715

GetDC, 448

GetTotalDays, 723

Delete, 320-321, 376, 668

GetDeviceCaps, 645

GetTotalHours, 723

DeleteContents, 214, 302,

GetDlgItem, 39-41

GetTotalMinutes, 723

367, 396, 425

GetDocument, 211

GetTotalRecords, 297

destructors, 564

GetDrawing, 397, 425

GetTotalSeconds, 723

DockControlBar, 254

GetDriverName, 653

GetUpperBound, 701

DoDataExchange, 330

GetErrorMessage, 668-669

GetViewWnd, 451

DoModal, 90

GetFirstPosition, 706

GetWindowText, 528

DoPreparePrinting, 648

GetFirstRecord, 299

GetYear, 720

DoSort, 192

GetFirstViewPosition, 270,

GoBack, 524

DoSpin, 455

303

GoForward, 524

Draw, 390, 446-447

GetFixedRows, 188

GoHome, 524

DrawLine, 165-166

GetFromPage, 653

GoSearch, 524

DrawRegion, 168-171

GetHour, 720

Height, 713

Edit, 320

GetItemRect, 263

InflateRect, 715

Empty, 725

GetKeyState, 65

InitSpinners, 453

EnableDocking, 253

GetLastError, 504

inline functions, 289

EndDoc, 659

GetLastRecord, 301

InsertAfter, 703

EndPage, 660

GetLength, 479, 725

InsertAt, 702

EndWaitCursor, 63

GetLine, 208

InsertBefore, 703

EnumFontFamiliesEx,

GetLineCount, 208

InterSectRect, 713

122-123

GetLocationURL, 524, 529

Invalidate, 163

EnumFontFamProc, 124

GetMaxID, 332

IsBOF, 319

exporting, 408-409

GetMinute, 720

IsEmpty, 725

FillFontList, 132-134

GetMonth, 720

IsEOF, 319

Find, 727

GetMouseCol, 194

IsKindOf, 665

FindIndex, 704

GetMouseRow, 194

IsPrinting, 643

FindOneOf, 728

GetNext, 703

IsRectEmpty, 713

Format, 720

GetNextAssoc, 706

IsRectNull, 713

friend functions, 565

GetNextRecord, 299

KillTimer, 79

GenerateError, 365

GetNextView, 270, 303

Left, 727

GenID, 189

GetPortName, 653

Listen, 501

GetAt, 701, 704

GetPrev, 703

LoadBitmap, 172

GetBitmap, 174

GetPrevRecord, 300

LoadCursor, 59

GetBusy, 524

GetPrinterDC, 653

LoadData, 188

GetClientRect, 452

GetRecordCount, 319

LoadDrawing, 488-491

GetCopies, 653

GetRecSe, 364

LoadStandardCursor, 59

GetCount, 704

GetRows, 188

LoadString, 264

GetCurRecord, 298

GetSecond, 720

LoadToolBar, 250

GetCurRecordNbr, 298

GetSize, 701

Lock, 439

GetCurrentTime, 720

GetSquiggleLength, 482

Lookup, 705

GetDay, 720

GetStatus, 720

 

functions 747

main (Hello, World applica-

OnChangeEsamptext, 136

366, 395, 424, 469

tion), 545-546

OnClick, 487

SDI application, 221

MakeLower, 727

OnClose, 504, 517-518

Spinner application,

MakeReverse, 727

OnClrmsg, 38-39

454-455

MakeUpper, 727

OnConnect, 504, 513

OnOK, 36

MessageBox, 22

OnContextMenu, 117,

OnOpenDocument, 304

arguments, 84-85

238-239

OnPaint, 167, 171-172, 176,

return value IDs, 85-86

OnCreate, 248-249,

714

Mid, 727

265-266

OnPreparePrinting, 648

ModArtClearDrawing, 421

OnDataFirst, 371

OnPrint, 638, 641-643

ModArtDraw, 421

OnDestroy, 467

OnReceive, 504, 516

ModArtInit, 428

OnDocumentComplete, 529

OnRecordDelete, 334

ModArtNewDrawing, 427

OnDraw, 397, 426, 638-641

OnRecordNew, 333

Move, 319

CSquiggleCtrl class, 486

OnRSelection, 164

MoveFirst, 319, 372

SDI application, 212

OnRType, 508

MoveLast, 319

OnEndPrinting, 655

OnRunpgm, 42-43

MoveNext, 319

OnExit, 36

OnSelchangeLfonts, 138

MovePrev, 319

OnFileopen, 91, 103

OnSelChangeWidth, 267

Navigate, 524

OnGoBack, 531

OnSend, 504

NewDataSet, 310

OnGoNext, 531

OnSetCursor, 62-63

NewDrawing, 398, 480

OnHello, 19, 114

OnShwmsg, 37-38

library module, 389

OnHelpAbout, 114-115

OnStarttime, 76-77

regular DLL, 418

OnIdle, 431, 457-460

OnStoptimer, 77

NewLine, 399-401, 480

OnInitDialog, 34-35, 511

OnTimer

library module, 386-388

ActiveX application,

clock timer, 73

MFC DLL, 411-416

192-193

counting timer, 77-79

regular DLL, 419-420

clock timer, 71-72

OnUpdateIndicatorColor,

NormalizeRect, 717

counting timer, 76

273-274

Offset, 712

Fonts application,

OnUpdateViewColorbar,

OnAccept, 504, 510, 513

133-135

255

OnBbitmap, 173-174

Graphics application,

OnViewColorbar, 256

OnBclose, 518

161-162

OnViewRefresh, 534

OnBconnect, 512

Mouse drawing pro-

OnViewStop, 533

OnBcustomdialog, 98-99

gram, 60-61

OnYesnocancel, 88-89

OnBeginPrinting, 655

OnKeyDown, 57-58, 61-62

Open, 318

OnBfirst, 307

OnLButtonDown, 56

overloading, 550-552

OnBlast, 308

OnMouseDownMsfgrid,

ParseDateTime, 722

OnBsend, 515-516

194

PopulateView, 306

OnBwhichoption, 99

OnMouseMove, 49-50,

PrintAll, 653

OnCbemployed, 309, 312

54-55

PrintCollate, 653

OnCbonidle, 456

OnMouseUpMsfgrid, 195

PrintRange, 653

OnCbthread1, 464

OnNewAddress, 527

PrintSelection, 653

OnCbthread2, 465

OnNewDocument, 303,

prototypes, 546

OnChangeInterval, 75

 

 

748 functions

declaring, 548 example, 547

PtInRect, 715 PulseEvent, 440 rand, 388 RandomStringValue,

190-191 RecalcLayout, 256 Receive, 502 Refresh, 524, 533

RefreshBoundData, 368-369 RemoveAll, 302, 702 RemoveAt, 702-704 ReportError, 669

Requery, 320-321

ResetEvent, 440 ResumeThread, 469 ReverseFind, 728 RGB, 51

Right, 727 SelectObject, 219 Send, 502 Serialize, 281, 396

CModArt class, 390 declaring, 283 example, 281, 291 SDI application,

215-216, 219 SetAbsolutePosition, 319 SetAddress, 530

SetAt, 701, 704 SetButtonInfo, 262 SetButtonStyle, 252 SetButtonText, 276 SetCapture, 211 SetCheck, 225, 255 SetColPosition, 195 SetColSel, 192 SetCurSel, 269 SetCursor, 59 SetDate, 720 SetDateTime, 720 SetDateTimeSpan, 723 SetEvent, 440 SetIndicators, 272 SetLength, 452, 479

SetMapMode, 156, 448 SetMergeCol, 189 SetMyFont, 137-140 SetPaneText, 277 SetParent, 509 SetPixel, 50

SetPoint, 452 SetRect, 386, 713 SetRectEmpty, 713 SetRedraw, 195 SetSize, 701 SetSort, 192

SetSquiggleLength, 482 SetStatus, 720 SetTextArray, 189 SetTime, 720

SetTimer, 72 SetViewportOrg, 448 SetWindowText, 277 ShellExecute, 44 ShowBitmap, 174-175 ShowControlBar, 255 ShowWindow, 255 Size, 713

StartDoc, 659

StartPage, 660

Stop, 524, 532 strcpy, 726 StretchBlt, 155 strlen, 726 SubtractRect, 714

SuspendSpinner, 462-463, 470-471

SuspendThread, 469 ThreadFunc, 461, 470 ThrowErrno, 671 ThrowOsError, 671 TopLeft, 712 TrackPopupMenu, 117 TrimLeft, 727 TrimRight, 727 UnionRect, 713 Unlock, 439-440 Update, 320, 356

UpdateBoundData, 370-371

UpdateColorbar, 269-270

UpdateData, 35, 456

UpdateWidthCB, 269

WaitForSingleObject, 463

Width, 713

WinExec, 44

G

g prefix, 554

GDI objects, printing, 655 GenerateError function, 365 generating random data,

189-191

generic classes, 381-382 GenID function, 189 GetAt function, 701, 704 GetBitmap function, 174 GetBusy function, 524

GetClientRect function, 452 GetCopies function, 653 GetCount function, 704 GetCurRecord function, 298 GetCurRecordNbr function,

298

GetCurrentTime function, 720

GetDay function, 720 GetDayOfWeek function, 720 GetDayOfYear function, 720 GetDC function, 448 GetDeviceCaps function, 645 GetDlgItem function, 39-41 GetDocument function, 211 GetDrawing function, 397,

425

GetDriverName function, 653 GetErrorMessage function,

668-669

GetFirstPosition function, 706 GetFirstRecord function, 299

GUIs 749

GetFirstViewPosition func-

297

bitmaps, 154-156

tion, 270, 303

GetTotalSeconds function,

brushes, 153-154

GetFixedRows function, 188

723

device contexts class,

GetFromPage function, 653

GetUpperBound function,

151

GetHour function, 720

701

pens, 151-153

GetItemRect function, 263

GetViewWnd function, 451

drawings, see drawings

GetKeyState function, 65

GetWindowText function, 528

icons, 20-21

GetLastError function, 504

GetYear function, 720

mapping modes, 156

GetLastRecord function, 301

global variables

printing, 638-641

GetLength function, 479, 725

example, 552-553

see also GUIs

GetLine function, 208

naming conventions, 554

grid control, see FlexGrid

GetLineCount function, 208

GoBack function, 524

control

GetLocationURL function,

GoForward function, 524

GUIs (graphical user inter-

524, 529

GoHome function, 524

faces)

GetMaxID function, 332

GoSearch function, 524

combo boxes

GetMinute function, 720

graphical user interfaces, see

creating, 260-266

GetMonth function, 720

GUIs

event handling, 267-268

GetMouseCol function, 194

graphics, 150

placeholders, 262

GetMouseRow function, 194

bitmaps

populating, 264

GetNext function, 703

copying, 155

positioning, 263

GetNextAssoc function, 706

displaying, 174-176

resource files, 257-260

GetNextRecord function, 299

loading, 155, 172-174

sizing, 276

GetNextView function, 270,

resizing, 155

styles, 263-264

303

variables, 173

updating, 268-270

GetPortName function, 653

color

menus, see menus

GetPrev function, 703

brushes, 153

status bars

GetPrevRecord function, 300

CModArt class color

adding panes, 271-272

GetPrinterDC function, 653

table, 392

messages, 273-275

GetRecordCount function,

menus, 235, 240

toolbars, 244-245

319

pens, 152-153

attaching to application

GetRecSe function, 364

SDI application,

frames, 247-249

GetRows function, 188

218-222

borders, 251

GetSecond function, 720

specifying, 51

buttons, 252-253, 276

GetSize function, 701

Spinner application,

child window IDs, 251

GetSquiggleLength function,

445-446

control styles, 250

482

coordinate-handling classes,

creating, 246, 250

GetStatus function, 720

710

docking, 253-254

GetToPage function, 653

CPoint class, 712

hiding, 254-256

GetTopLevelFrame function,

CRect class, 712-717

loading, 250

270

Offset function, 712

naming, 247

GetTotalDays function, 723

operator overloads,

styles, 250-251

GetTotalHours function, 723

711-712, 716

 

GetTotalMinutes function,

device contexts, 150-151

 

723

 

 

GetTotalRecords function,

 

 

750 .h file extension

H

.h file extension, 565

hash keys, troubleshooting, 710

HASSTRINGS combo box style, 264

header files, 565-566 custom dialog windows,

96-98

library modules, 402 ModArtDll, 417

height

fonts, 126 rectangles, 713

Height function, 713 Hello application

application framework, 12-14

dialog box icon, 20-21 project workspace, 11-12 source code, 17-19 window layout

designing, 15-17 maximize/minimize

buttons, 21-22

Hello, World application comments, 545

main function, 545-546 preprocessor directives, 545 return statement, 546 running, 543

source code listing, 543 workspace, 541-543

Help menus, designing, 107 helper classes (MFC)

collection classes, 699-700 array classes, 700-702 customizing, 707-710 list classes, 702-704 map classes, 704-706 type-safety, 707-710

coordinate-handling classes, 710

CPoint class, 712 CRect class, 712-717 CSize class, 717-718 Offset function, 712 operator overloads,

711-712, 716-718 string manipulation class

adding text, 725 case sensitivity, 727

constructor types, 724 formatting, 728-729 manipulation functions,

727

NULL-terminated types, 726

searches, 727-728 size, 725

time-handling classes, 718-719

COleDateTime class, 719-722

COleDateTimeSpan class, 722-724

formatting code, 720-721

hiding

edit boxes, 39-41 toolbars, 254

OnUpdateViewColorbar function, 255

OnViewColorbar function, 256

ShowControlBar function, 255

ShowWindow function, 255

HIENGLISH mapping mode, 156

HIGHEST thread priority, 432

HIMETRIC mapping mode, 156

hit-testing rectangles, 715-716 hotkeys, 107

.hpp file extension, 565 HTML (Hypertext Markup

Language) viewer browser controls, 524 browser status, 524 navigation functions,

523-524

I

icons

button icons, 246 creating, 20-21 message boxes, 85

IDispatch interface, 181 idle processing threads, 431

building, 457-459 continuous tasks, 459 OnIdle function, 455 starting, 456 stopping, 456

IDLE thread priority, 432 IDR_DAY11TYPE menu, 233 IDR_MAINFRAME menu,

233

IDs (identifiers) controls, 44-45 message boxes, 85-86 timers, 70-71

if statement, 549 images, see graphics IMPLEMENT_SERIAL

macro, 282-283, 293 #import directive, 349-350 importing ADO DLLs,

349-350

#include directives, 97

CModArt, 392 CModArt class, 392 CTestAppDoc, 394, 414

library modules

751

DbAdo application, 364 Graphics application, 162 Hello, World application,

545

SDI application, 213 Sock application, 510 Squiggle control, 481

independent threads, 431, 460 arrays, 433

clean-up procedures, 466-468

creating, 432

main thread functions, 461 priorities, 432-433

stack size, 433 starting, 462-463 stopping, 462-463 suspended mode, 433 synchronizing, 434-435

critical sections, 436 events, 439-440 mutexes, 436-438 semaphores, 438-439

triggering from view object, 463-464

indexing map classes, 704-706 indirection operator (*), 554 InflateRect function, 715 inheritance, 380-381

Car class example, 572-576 Human class example,

569-572 initializing

controls, 33-35 printing, 654, 660

InitSpinners function, 453 inline functions, 289

see also functions

Insert Control dialog box, 491 Insert Resource dialog box,

109

InsertAfter function, 703 InsertAt function, 702

InsertBefore function, 703 inserting

records

ADO, 357, 373-374

ODBC, 320, 331-334 toolbars, 246

int data type, 548 interfaces, IDispatch, 181 Internet applications, 519 Internet Explorer

ActiveX document model, 522

HTML viewer

browser controls, 524 browser status, 524 navigation function,

523-524

intersection (rectangles), 713 InterSectRect function, 713 Invalidate function, 163 Invoke Methods dialog box,

492

IsBOF function, 319 IsEmpty function, 725 IsEOF function, 319 IsKindOf function, 665 ISOTROPIC mapping mode,

156

IsPrinting function, 643 IsRectEmpty function, 713 IsRectNull function, 713 italic text, formatting, 127

J-K

just-in-time debugging, 684 see also debugging

techniques

KeepCurrentDrawing property (Squiggle control), 483

keyboard events drawing program

cursor, 59 OnInitDialog function,

60-61

OnKeyDown function, 57-58, 61-62

OnSetCursor function, 62-63

GetKeyState function, 65 messages, 56-57

virtual key codes, 65 keyboard shortcuts, 107 keys

accelerators creating, 118-119 defined, 107 restrictions, 119

Web Browser application, 532

hotkeys, 107 modifiers, 532

keywords, see statements KillTimer function, 79

L

l prefix, 554

landscape orientation (printing), 654

Layout menu commands, Tab Order, 30

Left function, 727 library modules, 382-383

advantages, 402 creating, 383-385 header files, 402 static library project

class definitions, 385 clearing drawings,

390-391

752 library modules

creating drawings,

ActiveX application

constructor, 391

386-389

DoSort function, 192

Draw function, 390

displaying drawings,

GenID function, 189

NewDrawing function,

389-390

LoadData function, 188

389, 398

drawing area, 386

OnInitDialog function,

NewLine function, 386,

project module, 384-385

192-193

399

serializing drawings, 390

OnMouseDownMsfgrid

Serialize function, 390

test application, 392-395

function, 194

SetRect function, 386

see also DLLs

OnMouseUpMsfgrid

combo boxes

licensing issues (ActiveX con-

function, 195

CMainFrame message

trols), 184, 196, 477

RandomStringValue

map, 268

lines

function, 190-191

CreateColorBar func-

adding, 206

catching exceptions

tion, 261-262

CLine class

all types of exceptions,

OnCreate function,

color, 218-219

665

265-266

constructor, 204-205

try…catch block, 663

OnSelChangeWidth

creating, 203

try block with function

function, 267

header file, 216

calls, 664

OnUpdateViewColorbar

serialization, 217

two different exceptions,

function, 255

counting, 207-208

664-665

OnViewColorbar func-

drawing, 164

CCustomException class,

tion, 256

colors, 164-165

675-676

project resource files,

DrawLine function,

Clasfarm program

258

165-166

.cpp file, 566

UpdateColorBar func-

NewLine function,

header file, 565

tion, 269-270

386-388, 411-416,

classes

UpdateWidthCB func-

419-420

declarations, 562-563

tion, 269

retrieving, 208

nesting, 566-567

Width menu command

list classes, 702-704

clock timer

event handler, 270

LIST toolbar control style,

OnInitDialog function,

counting timer

250

71-72

OnInitDialog function,

Listen function, 501

OnTimer function, 73

76

listening for messages, 501

CModArt class

OnStarttime function,

listing available fonts

constructor, 479

76-77

callback functions, 122

GetLength function, 479

OnStoptimer function,

EnumFontFamiliesEx func-

NewDrawing function,

77

tion, 123

480

OnTimer function, 77-78

EnumFontFamProc func-

NewLine function, 480

Stop button, 80-81

tion, 124

SetLength function, 479

CTestAppDoc class

example, 131-133

CModArt library module

DeleteContents function,

FillFontList function, 132

#include directives, 392

396

TrueType fonts, 140

ClearDrawing function,

GetDrawing function,

listings

391

397

 

color table, 392

#include directives, 394

listings 753

OnNewDocument func-

tion, 330

300

tion, 395

GetMaxID function, 332

GetTotalRecords func-

Serialize function, 396

OnRecordDelete func-

tion, 297

CTestAppDoc class

tion, 334

IMPLEMENT_SERIAL

declaration, 423-424

OnRecordNew function,

macro, 293-294

DeleteContents function,

333

NewDataSet function,

425

dialog windows

310

GetDrawing function,

header files, 97

OnBfirst function,

425

OnBcustomdialog func-

307-308

#include directives, 414

tion, 98-99

OnBlast function, 308

OnNewDocument func-

OnBwhichoption func-

OnCbemployed func-

tion, 424

tion, 99

tion, 309, 312

Serialize function, 425

OnFileopen function, 91,

OnNewDocument func-

CTestAppView class,

103

tion, 303-304

OnDraw function, 397,

OnYesnocancel function,

OnOpenDocument func-

426

88-89

tion, 304-305

DbAdo database

OPENFILENAME

PopulateView function,

AddNew function, 374

structure, 102

306-307

CreateBlankRecord

flat-file database

record class header, 310

function, 374-375

AddNewRecord func-

Serialize function, 291,

custom record class,

tion, 296-297

302

362-363

CPerson class declara-

Fonts application

Delete function, 376

tion, 292

FillFontList function,

DeleteContents function,

CPerson constructor,

132-134

367

290

listing available fonts,

GenerateError function,

custom object header,

131-132

365

305-306

OnChangeEsamptext

GetRecSet function, 364

DeleteContents function,

function, 136

#include directives, 364

302

OnInitDialog function,

MoveFirst function, 372

document class imple-

133-135

OnDataFirst function,

mentation, 295

OnSelchangeLfonts

371

Get/Set inline functions,

function, 138

OnNewDocument func-

290

SetMyFont function,

tion, 366

GetCurRecord function,

137-140

RefreshBoundData func-

298

function prototype, 547

tion, 368-369

GetCurRecordNbr func-

GetDlgItem function, 39-41

UpdateBoundData func-

tion, 298

global/local variables,

tion, 370-371

GetFirstRecord function,

552-553

DbOdbc database

299

Graphics application

CDbOdbcSet construc-

GetLastRecord function,

color table, 164-165

tor, 331

301

DrawLine function,

Database field variables,

GetNextRecord function,

165-166

329

299-300

DrawRegion function,

DoDataExchange func-

GetPrevRecord function,

 

754 listings

169-171

421

GetColor function, 222

#include directives, 162

ModArtInit function,

GetLine function, 208

OnBbitmap function,

428

GetLineCount function,

173-174

ModArtNewDrawing

208

OnInitDialog function,

function, 418, 427

#includes directives, 213

161-162

module definition file,

Line.cpp file, 217

OnPaint function, 167,

422

Line.h file, 216

171-172, 176

NewLine function,

mouse functions,

OnRSelection function,

412-416, 419-420

209-210

164

Serialize function, 421

OnDraw function, 212

ShowBitmap function,

Mouse drawing program

OnNewDocument func-

175

OnInitDialog function,

tion, 221

Hello application, 19

60-61

Serialize function,

Hello, World application,

OnKeyDown function,

215-216, 219

543

57-58, 61-62

serialization

inheritance

OnLButtonDown func-

DECLARE_SERIAL

Allauto class example,

tion, 56

macro, 282

575

OnMouseMove function,

IMPLEMENT_SERIAL

Auto class example,

49-50, 54-55

macro, 282-283

573-574

OnSetCursor function,

Serialize function, 281

Car class example,

62-63

Sock application

574-575

OnClrmsg function, 38-39

#include directives, 510

Human class example,

OnExit function, 36

OnAccept function, 510,

570-571

OnInitDialog function,

513

MDI application

34-35

OnBclose function, 518

color menu event han-

OnRunpgm function, 42-43

OnBconnect function,

dlers, 235

OnShwmsg function, 37-38

512

context menu, 238-239

overloaded functions,

OnBsend function,

event-handler declara-

550-552

515-516

tions, 233-234

pointers, 555-557

OnClose function,

message map entries,

raising exceptions, 666-667

517-518

234-235

SDI application

OnConnect function,

menu functions

AddLine function, 206,

513

OnContextMenu func-

221-222

OnInitDialog function,

tion, 117

Black menu functions,

511

OnHello function, 114

224

OnReceive function, 516

OnHelpAbout function,

Blue menu functions,

OnRType function, 508

114-115

224-225

SetParent function, 509

ModArtDll

CLine constructor, 204,

Spinner application

CModArt class defini-

218

CalcPoint function, 451

tion, 411

color table specification,

color table, 445-446

header file, 417

220

CSpinner class declara-

ModArtClearDrawing

DeleteContents function,

tion, 445

function, 421-422

214

CSpinner constructor,

ModArtDraw function,

Draw function, 205, 219

 

main function

755

444

CSpinner source file, 449

CTaskingDoc source file, 450

DoSpin function, 455 Draw function, 446-447 InitSpinners function,

453

OnCbonidle function, 456

OnCbthread1 function, 464

OnCbthread2 function, 465

OnDestroy function, 467 OnIdle function,

457-460 OnNewDocument func-

tion, 454-455, 469 SuspendSpinner function, 462-463, 470 ThreadFunc function,

461, 470 Squiggle control

constructor, 485 GetSquiggleLength

function, 482 #include directives, 481 LoadDrawing function,

488-491

OnClick function, 487 OnDraw function, 486 SetSquiggleLength func-

tion, 482 status bars

CToolbarDoc message map, 274

indicator table definition, 272

OnUpdateIndicatorColor function, 273-274

structures, 560

toolbars, attaching to application frames, 248-249

TRACE macro example, 686-687

WebBrowse application CMainFrame message

map, 528 OnDocumentComplete

function, 529 OnGoBack function,

531

OnGoNext function, 531 OnNewAddress func-

tion, 527 OnViewRefresh func-

tion, 534 OnViewStop function,

533

SetAddress function, 530

LoadBitmap function, 172 LoadCursor function, 59 LoadData function, 188 LoadDrawing function,

488-491 loading data

bitmaps, 155 LoadBitmap function,

172

LoadImage function, 172

OnBbitmap function, 173-174

cursors into memory, 59 drawings, 488-491 FlexGrid control, 188-189 toolbars, 250

LoadStandardCursor function, 59

LoadString function, 264 LoadToolBar function, 250 local variables

example, 552-553 naming conventions, 554

Lock function, 439

locking semaphores, 439 LOENGLISH mapping mode,

156

LOGFONT structure, 123 logical operators, 550

AND (&&), 51 OR (||), 52

LOMETRIC mapping mode, 156

long int data type, 548 Lookup function, 705 loopback computer name, 511 LOWEST thread priority, 432 lpqzFacename argument

(CreateFont function), 129

M

macros

ADO_FIXED_LENGTH _ENTRY, 355

ADO_NUMERIC_ENTRY, 355

ADO_VARIABLE _LENGTH_ENTRY, 355-356

AFX_EXT_CLASS, 408 AFX_MANAGE_STATE,

409

ASSERT, 687-689 BEGIN_ADO_BINDING,

354 DECLARE_SERIAL, 282,

292 END_ADO_BINDING, 354 IMPLEMENT_SERIAL,

282-283, 293 TRACE, 685-687, 708 VERIFY, 687-689

main function (Hello, World application), 545-546

MakeLower function, 727

756 MakeLower function

MakeReverse function, 727

accelerators

application shell, 108-109

MakeUpper function, 727

creating, 118-119

attaching menus, 112

map classes, 704-706

restrictions, 119

creating menus

mapping modes, 156, 448

attaching, 112

menu items, 110

mathematical operators, 549

captions, 110

menu resources, 109

maximize/minimize buttons,

cascading, 106

separator lines, 111

21-22

context menus, 106

event handling, 112

MB_ABORTRETRYIG-

creating, 116-118,

OnExit function, 114

NORE button ID, 85

236-239

OnHello function,

MB_OK button ID, 85

defined, 106

113-114

MB_OKCANCEL button ID,

designing, 116

OnHelpAbout function,

85

event handling, 116

114-115

MB_RETRYCANCEL button

designing, 107

message boxes

ID, 85

event handling, 112

creating

MB_YESNO button ID, 85

color menu, 235

button combinations, 85

MB_YESNOCANCEL button

COMMAND event, 114

icons, 85

ID, 85

event-handler declara-

MessageBox function,

MDI (Multiple Document

tions, 233-234

84

Interface) applications,

message maps, 234-235

MessageBox function,

229-230

OnExit function, 114

85-86

application shell, 231-232

OnHello function,

sample application

classes, 230-231

113-114

control properties, 86-87

context menus, 236-239

OnHelpAbout function,

control variables, 88

drawing functionality, 232

114-115

OnYesnocancel func-

menu handling

hotkeys, 107

tions, 88-89

color menu, 235

IDR_DAY11TYPE, 233

text, changing, 22

event-handler declara-

IDR_MAINFRAME, 233

message maps

tions, 233-234

items, adding, 110

CMainFrame, 268

message maps, 234-235

menu resources, creating,

CToolbarDoc class, 274

SDI applications, compared,

109

MDI application, 234-235

239

naming, 119

ON_COMMAND_RANGE,

Member Variables tab (Class

properties, 110

236

Wizard), 32

SDI application

Message Maps tab (Class

Memory window (debugger),

Black menu functions,

Wizard), 34

694

224

Message Options dialog box,

Menu Designer

Blue menu functions,

695

creating menus

224-225

MessageBox function, 22

captions, 110

creating, 222

arguments, 84-85

properties, 110

properties, 223

return value IDs, 85-86

separators, 111

separator lines, 111

messages

starting, 109

troubleshooting, 240

clearing, 38-39

menus

Menus application

disabling, 39-41

 

 

displaying, 37-38

ModArtClearDrawing function

757

hiding, 39-41

674

mode, 156

keyboard events, 56-57

form classes, 382

MM_ISOTROPIC mapping

listening for, 501

list classes, 702-704

mode, 156

mouse events, 48

map classes, 704-706

MM_LOENGLISH mapping

receiving, 502-503, 516-517

string manipulation class

mode, 156

sending, 502, 515-516

adding text, 725

MM_LOMETRIC mapping

status bars, 273-275

case sensitivity, 727

mode, 156

windows, viewing, 695-696

constructor types, 724

MM_TEXT mapping mode,

methods, see functions

formatting, 728-729

156

MFC (Microsoft Foundation

manipulation functions,

MM_TWIPS mapping mode,

Classes), 382, 699-700

727

156

array classes, 700-702

NULL-terminated types,

mnemonics, 31

coordinate-handling classes,

726

modal dialog windows, 92

710

searches, 727-728

see also dialog windows

CPoint class, 712

size, 725

ModArt application, 478-480

CRect class, 712-717

time-handling classes,

library module (random

CSize class, 717-718

718-719

squiggle generator)

Offset function, 712

COleDateTime class,

ClearDrawing function,

operator overloads,

719-722

391

711-712, 716-718

COleDateTimeSpan

color table, 392

customizing, 675-676,

class, 722-724

constructor, 391

707-710

formatting code,

creating, 385

exception classes

720-721

Draw function, 390

CArchiveException

type-safety, 707-710

#include directives, 392

class, 671-672

MFC extension DLLs

NewDrawing function,

CDAOException class,

creating, 410

389, 397-398

672-673

export operations, 408

NewLine function, 386,

CDBException class,

ModArtDll project

399

672-673

class declaration, 411

rand function, 388

CException class,

NewLine function,

Serialize function, 390

668-669

411-416

SetRect function, 386

CFileException class,

project file, 410

variables, 385

667, 670-671

test application, 413-414

testing, 413-414

CMemoryException

see also DLLs

Squiggle control

class, 669

MFC Tracer tool, 698

CModArt class modifi-

CNotSupportedException

Microsoft Foundation

cations, 478-481

class, 674

Classes, see MFC

control shell, 477-478

COleDispatchException

Mid function, 727

event handling, 485-487

class, 673-674

MM_ANSIOTROPIC map-

events, 489-491

COleException class,

ping mode, 156

methods, 487-489

673-674

MM_HIENGLISH mapping

properties, 481-483

CResourceException

mode, 156

property page, 483-485

class, 670

MM_HIMETRIC mapping

testing, 491-492

CUserException class,

 

ModArtClearDrawing func-

 

 

tion, 421

 

 

ModArtDll application

758 ModArtDll application

MFC DLL

49-50, 54-55

CModArt class declara-

tracking mouse coordi-

tion, 411

nates, 53-55

NewLine function,

Move function, 319

411-416

MoveFirst function, 319, 372

project file, 410

MoveLast function, 319

testing, 413-414

MoveNext function, 319

regular DLL, 416

MovePrev function, 319

header file, 417

moving toolbars, 10

ModArtClearDrawing

Multiple Document Interface,

function, 421-422

see MDI applications

ModArtDraw function,

multiplication operator (*),

421

549

ModArtNewDrawing

multitasking, 430

function, 418

arrays, 433

ModArtSerialize func-

clean-up procedures,

tion, 421

466-468

module definition file,

idle processing threads, 431

422

building, 457-459

NewLine function,

continuous tasks, 459

419-420

OnIdle function, 455

project file, 417

starting, 456

testing, 423-426

stopping, 456

ModArtDraw function, 421

independent threads,

ModArtInit function, 428

431, 460

ModArtNewDrawing func-

creating, 432

tion, 427

main thread function,

modeless dialog windows, 92

461

see also dialog windows

priorities, 432-433

modifier keys (Web Browser

stack size, 433

application), 532

starting, 462-463

mouse events

stopping, 462-463

handling

suspended mode, 433

OnMouseDownMsfgrid

trigging from view

function, 194

object, 463-464

OnMouseUpMsfgrid

thread synchronization,

function, 195

434-435

SDI application,

critical sections, 436

209-211

events, 439-440

messages, 48

mutexes, 436-438

Mouse drawing program

semaphores, 438-439

application shell, 49

mutexes, 436-438

OnLButtonDown func-

 

tion, 56

 

OnMouseMove function,

 

m_ prefix, 33

m_ofn property (CFileDialog class), 102

N

\n string, 247 naming conventions

constructors, 564 menus, 119 toolbars, 247 variables

global, 554 local, 554 m_ prefix, 33

Navigate function, 524 navigating

recordsets

ADO, 352-353 GetCurRecord function,

298

GetFirstRecord function, 299

GetLastRecord function, 301

GetNextRecord function, 299

GetPrevRecord function, 300

MoveFirst function, 372 ODBC, 319-320 OnBfirst function, 307 OnBlast function, 308 OnDataFirst function,

371

the Web, 523-524 nCharSet argument

(CreateFont function), 127-128

nClipPrecision argument (CreateFont function), 128

nEscapement argument

OnBeginPrinting function

759

(CreateFont function), 126 nested classes, 566-569 networks, 496-497

debugging across, 685 Internet applications, 519 protocols, 497

sockets, 497

closing connections, 503, 517-519

controls, 505-508 creating, 498-500 error handling, 504

event handling, 503-504 listening for messages,

501

opening connections, 500-501, 511-514

ports, 498 receiving messages,

502-503, 516-517 sending messages, 502,

515-516

socket class, 509-511 new keyword, 666 NewDataSet function, 310 NewDrawing function, 398,

480

library module, 389 regular DLL, 418

NewLine function, 399-401, 480

library module, 386-388 MFC DLL, 411-416 regular DLL, 419-420

NEWTEXTMETRICEX structure, 124

nHeight argument (CreateFont function), 126

NOINTEGRALHEIGHT combo box style, 264

nOrientation argument (CreateFont function), 126

NORMAL thread priority, 432

NormalizeRect function, 717

nOutPrecision argument (CreateFont function), 128

nPitchAndFamily argument (CreateFont function), 129

nQuality argument (CreateFont function), 128

NULL-terminated strings, 726

NumberSquiggles property (Squiggle control), 483

nWeight argument (CreateFont function), 126-127

nWidth argument (CreateFont function), 126

O

object IDs (controls), 44-45 Object Linking and

Embedding (OLE), 180 debugging objects, 684 exceptions, 673-674

see also ActiveX controls object-oriented design

encapsulation, 380 inheritance, 380-381

Car class example, 572-576

Human class example, 569-572

objects

adding to classes, 708-709 ADO, see ADO containers, 700-702 positioning, 450-452

ODBC (Open Database Connectivity), 316-317

Administrator, 322

data source configuration, 322-323

database connections, 317

exceptions, 672-673 records

adding, 331-334 deleting, 334-335

recordsets closing, 319

editing, 320-321 navigating, 319-320 opening, 317-318

sample application application shell,

324-325 CDbOdbcSet construc-

tor, 331

control properties, 325-327

control variables, 328 Database field variables,

329 DoDataExchange func-

tion, 330

record management, 331-335

ODBC Microsoft Access Setup dialog box, 323

OEMCONVERT combo box style, 264

Offset function, 712

OLE (Object Linking and Embedding), 180

debugging objects, 684 exceptions, 673-674

see also ActiveX controls

OLE/COM Object Viewer tool, 697

OnAccept function, 504, 510, 513

OnBbitmap function, 173-174 OnBclose function, 518 OnBconnect function, 512 OnBcustomdialog function,

98-99

OnBeginPrinting function, 655

OnBfirst function, 307

760 OnBfirst function

OnBlast function, 308

counting timer, 76

OnShwmsg function, 37-38

OnBsend function, 515-516

drawing program, 60-61

OnStarttime function, 76-77

OnBwhichoption function, 99

Fonts application, 133-135

OnStoptimer function, 77

OnCbemployed function, 309,

Graphics application,

OnTimer function

312

161-162

clock timer, 73

OnCbonidle function, 456

OnKeyDown function, 57-58,

counting timer, 77-79

OnCbthread1 function, 464

61-62

OnUpdateIndicatorColor

OnCbthread2 function, 465

OnLButtonDown function, 56

function, 273-274

OnChangeEsamptext func-

OnMouseDownMsfgrid func-

OnUpdateViewColorbar

tion, 136

tion, 194

function, 255

OnChangeInterval function,

OnMouseMove function,

OnViewColorbar function,

75

49-50, 54-55

256

OnClick function, 487

OnMouseUpMsfgrid func-

OnViewRefresh function, 534

OnClose function, 504,

tion, 195

OnViewStop function, 533

517-518

OnNewAddress function, 527

OnYesnocancel functions,

OnClrmsg function, 38-39

OnNewDocument function,

88-89

OnConnect function, 504, 513

303, 366, 395, 424, 469

ON_COMMAND_RANGE

OnContextMenu function,

SDI application, 221

message map, 236

117, 238-239

Spinner application,

Open Database Connectivity,

OnCreate function, 248-249,

454-455

see ODBC

265-266

OnOK function, 36

Open function, 318

OnDataFirst function, 371

OnOpenDocument function,

OPENFILENAME structure,

OnDestroy function, 467

304

102

OnDocumentComplete

OnPaint function, 167,

opening

function, 529

171-172, 176, 714

database connections,

OnDraw function, 397, 426,

OnPreparePrinting function,

350-351

638-641

648

databases, 351-352

compared to OnPrint, 642

OnPrint function, 638

documents

CSquiggleCtrl class, 486

compared to OnDraw, 642

OnNewDocument func-

SDI application, 212

overriding, 641-643

tion, 303-304

OnEndPrinting function, 655

OnReceive function, 504, 516

OnOpenDocument func-

OnExit function, 36

OnRecordDelete function,

tion, 304-305

OnFileopen function, 91, 103

334

recordsets, 317-318

OnGoBack function, 531

OnRecordNew function, 333

socket connections,

OnGoNext function, 531

OnRSelection function, 164

500-501, 511-514

OnHello function, 19, 114

OnRType function, 508

operators

OnHelpAbout function,

OnRunpgm function, 42-43

address-of (&), 554-555

114-115

OnSelchangeLfonts function,

assignment (=), 549

OnIdle function, 431, 457-460

138

binary

OnInitDialog function, 34-35,

OnSelChangeWidth function,

AND (&), 51-52

511

267

attribute flags, 52-53

ActiveX application,

OnSend function, 504

OR (|), 52

192-193

OnSetCursor function, 62-63

extraction operator (>>),

clock timer, 71-72

 

548

 

 

indirection (*), 554-556

print jobs

761

logical, 550

colors, 152-153

Sock application, 510

AND (&&), 51

creating, 151

Squiggle control, 481

OR (||), 52

selecting, 64

preemptive multitasking, see

mathematical, 549

styles, 152

multitasking

overloads, 711-712

pipe character (|)

prefixes, m_, 33

COleDateTime class,

binary OR (|), 52-53

previewing

722

logical OR (||), 52

AppWizard, 637

CRect class, 716

pitch (fonts), 129

support, 638

CSize class, 718

pointers

Print dialog box, 650-654

redirection (<<), 546

DbAdo database, 364

accessing directly, 657-659

relational, 550

declaring, 554

bypassing, 649

scope (::), 568

defined, 211

Collate check box, 651

structure member oper-

examples, 555-557

PrintAll function, 653

ator (.), 561

Graphics application, 174

PrintCollate function, 653

optimizing printing, 656

Spinner application, 454

print jobs

OR operators

points

accessing directly, 657-660

binary OR (|), 52-53

hit-testing, 715-716

AppWizard, 637

logical OR (||), 52

intersection, 713

aspect ratio, 645-647

orientation (print jobs), 647,

polymorphism, 550-552

canceling, 657

654

pop-up menus, see context

coordinates

Output pane (Developer

menus

converting, 644

Studio), 9

PopulateView function, 306

locating, 642

overloaded functions, 550-552

populating

device contexts, 643-644,

overriding OnPrint function,

combo boxes, 264

656

641-643

forms, 367-369

DevMode structure, 652

OWNERDRAWFIXED

portrait orientation (print

different display/printed

combo box style, 264

jobs), 654

output, 649

OWNERDRAWVARIABLE

ports, 498

GDI objects, 655

combo box style, 264

positioning objects, 450-452

graphics, 638-641

 

combo boxes, 263

initializing, 654, 660

 

toolbars, 251

MDI framework, 637

P

precompiler directives

OnDraw function, 643

#import, 349-350

optimizing, 656

 

#include directives, 97

options, 652

page ranges, printing,

CModArt, 392

orientation, 647, 654

647-648

CModArt class, 392

page ranges, 648

panes (status bars), adding,

CTestAppDoc, 394, 414

pagination, 647

271-272

DbAdo application, 364

Print dialog box, 650-654

Parameter object, 346

Graphics application,

accessing directly,

ParseDateTime function, 722

162

657-659

passing arguments by refer-

Hello, World applica-

bypassing, 649

ence, 557-558

tion, 545

Collate check box, 651

pens

SDI application, 213

SDI framework, 637-641

762

print jobs

spooling, 659

start/end pages, 647-650 status, checking, 660 support, 638 WYSIWYG, 641

PrintRange function, 653 PrintSelection function, 653 priority levels (threads),

432-433

Process Viewer tool, 697 processes, viewing, 697 programs, see applications progress bars

messages, 273-275 panes, 271-272

Project Settings dialog box, 678

properties (ActiveX controls) ambient, 474

custom, 474 extended, 474

property page, 483-485 specifying, 475

Squiggle control, 481-483 control settings, 484 control variables, 484 layout, 483

protocols, 497

prototypes (functions), 546 declaring, 548

example, 547

PtInRect function, 715 pull-down menus, 106

Black menu functions, 224 Blue menu functions,

224-225 creating, 222 properties, 223

PulseEvent function, 440

Q-R

QuickWatch window (debugger), 694

radio buttons, 27 rand function, 388

random data generation

FlexGrid control, 189-191 random squiggle generator ClearDrawing function,

391

color table, 392 constructor, 391 creating, 385 Draw function, 390

#include directives, 392 NewDrawing function,

389, 397-398 NewLine function, 386,

399

rand function, 388 Serialize function, 390 SetRect function, 386 variables, 385

RandomStringValue function, 190-191

.rc filename extension, 108 readOnly flag (recordsets),

318

RecalcLayout function, 256 Receive function, 502 receiving messages, 502-503,

516-517 records

adding

AddNewRecord function, 295-297

ADO, 357, 373-374

ODBC, 320, 331-334

counting, 297 creating, 374-375 current record number,

returning, 297-298 deleting

ADO, 357, 375-376

ODBC, 321, 334-335 displaying current, 306-307 fields, accessing, 353-354 saving, 308-312, 370-371 updating, 356

recordsets, 346 accessing

ADO, 353-354 ODBC, 319

closing, 357 editing, 320-321 navigating, 298

ADO, 352-353 GetCurRecord function,

298

GetFirstRecord function, 299

GetLastRecord function, 301

GetNextRecord function, 299

GetPrevRecord function, 300

MoveFirst function, 372 ODBC, 319-320 OnBfirst function, 307 OnBlast function, 308 OnDataFirst function,

371 opening, 317-318 types, 318

rectangles center, 713

drawing, 168-171 height/width, 713 hit-testing, 715-716 intersection, 713

separators (menus), creating

763

negative height/width, 717 sizing, 715

redirection operator (<<), 546 reference variables, 557-558 Refresh button (browser

application), 533-535 Refresh function, 524, 533 RefreshBoundData function,

368-369 REGISTERDROP toolbar

control style, 250 Registered ActiveX Controls

folder, 184

registering ActiveX controls

Registered ActiveX Controls folder, 184-186

regsvr32 utility, 183

Registers window (debugger), 694

regsvr32 utility, 184 regular DLLs, see DLLs relational operators, 550 Release mode, 678

remote debugging, 683-684 RemoveAll function, 302 RemoveAt function, 702-704 RemoverAll function, 702 ReportError function, 669 Requery function, 320-321 ResetEvent function, 440 resizing bitmaps, 155 Resource View, 8

resources

exception handling, 670 leaks, 151

resource files defined, 108 editing, 257-260

ResumeThread function, 469 return statement, 546

return values

EnumFontFamProc function, 124

MessageBox function, 85-86

ReverseFind function, 728 RGB function, 51

Right function, 727

Run Program buttons, creating, 42-43

running applications, 543-544 runtime licenses, 477

S

saving

drawings, 215-217, 395 records, 308-312, 370-371

scope operator (::), 568 SDI (Single Document

Interface) applications classes

CDocument, 200

CFrameView, 200 CObArray class, 205 CView, 200 CWinApp, 200

color

AddLine function, 221-222

color table specification, 219-220

GetColor function, 222 lines, 218-219 OnNewDocument func-

tion, 220-221 DbOdbc database

adding records, 331-334 application shell,

324-325 CDbOdbcSet construc-

tor, 331

control properties, 325-327

control variables, 328 Database field variables,

329

deleting records, 334-335

DoDataExchange function, 330

Document/View architecture, 200

drawings deleting, 214

saving, 215-217 exception handling, 207 #includes directives, 213 lines

adding, 206 counting, 207-208 drawing, 203-205 retrieving, 208

MDI applications, compared, 239

mouse events, 209-211 printing, 637 pull-down menus

Black menu functions, 224

Blue menu functions, 224-225

creating, 222 properties, 223

rendering, 211-212

Select Database Tables dialog box, 325

selecting brushes, 153 fonts, 136

OnSelchangeLfonts function, 138

SetMyFont function, 137

SelectObject function, 219 semaphores, 438-439 Send function, 502 sending messages, 502,

515-516

separators (menus), creating, 111

serialization

764 serialization

classes

307-308

SetSquiggleLength function,

CArchive, 280

saving, 308-312

482

CModArt, 390

views, 285

SetStatus function, 720

CTestAppDoc, 396, 425

resetting, 309-310

SetTextArray function, 189

design, 283-284

view class, 305-306

SetTime function, 720

defined, 279

Serialize function, 281, 396

SetTimer function, 72

macros, 281

CModArt class, 390

SetViewportOrg function, 448

DECLARE_SERIAL,

declaring, 283

SetWindowText function, 277

282

example, 281, 291

shapes

IMPLEMENT_SERIAL,

SDI application, 215-216,

center, 713

282-283

219

circles, 168-171

ModArtDll project, 421

SetAbsolutePosition function,

height/width, 713, 717

Serialize function, 281, 396

319

hit-testing, 715-716

CModArt class, 390

SetAddress function, 530

intersection, 713

declaring, 283

SetAt function, 701, 704

lines

examples, 281, 291

SetButtonInfo function, 262

colors, 164-165

SDI application,

SetButtonStyle function, 252

DrawLine function,

215-216, 219

SetButtonText function, 276

165-166

Serialize application

SetCapture function, 211

NewLine function,

application shell, 284-285

SetCheck function, 225, 255

386-388, 399-401,

clean-up functions, 302

SetColPosition function, 195

411-416, 419-420

controls

SetColSel function, 192

rectangles, 168-171

properties, 286-287

SetCurSel function, 269

sizing, 715

variables, 287

SetCursor function, 59

see also drawings; graphics

CPerson class, 288

SetDate function, 720

ShellExecute function, 44

constructor, 290

SetDateTime function, 720

short int data type, 548

inline functions,

SetDateTimeSpan function,

ShowBitmap function,

289-290

723

174-175

serializing, 291-294

SetEvent function, 440

ShowControlBar function,

variables, 289

SetIndicators function, 272

255

document class

SetLength function, 452, 479

ShowWindow function, 255

implementation, 295

SetMapMode function, 156,

SIMPLE combo box style,

variables, 294

448

264

documents, opening,

SetMergeCol function, 189

Single Document Interface,

303-305

SetMyFont function, 137-140

see SDI applications

record class header, 310

SetPaneText function, 277

single stepping (debugging)

records

SetParent function, 509

breakpoints

adding, 295-297

SetPixel function, 50

setting, 689-690

counting, 297

SetPoint function, 452

toggling on/off, 690

current record numbers,

SetRect function, 386, 713

step options, 691-692

297-298

SetRectEmpty function, 713

Size function, 713

displaying, 306-307

SetRedraw function, 195

sizing

navigating, 298-301,

SetSize function, 701

bitmaps, 155

 

SetSort function, 192

combo boxes, 276

SQL_FETCH_NEXT navigation type

765

coordinate-handling classes

Source Browser

Messages view, 695-696

CSize class, 717-718

base classes option, 682

Processes view, 697

operator overloads, 718

Call Graph option, 683

Threads view, 697

rectangles, 715

Callers Graph option, 683

Windows view, 696

strings, 725

Definitions and References

Squiggle control

toolbar borders, 251

option, 681

CModArt class modifica-

slash command, 545

derived classes option, 683

tions

snapshot record sets, 318

File Outline option, 682

constructor, 479

Sock application (sockets)

identifiers, 681

GetLength function, 479

connections

Spinner application

member variables, 478

closing, 517-519

framework

NewDrawing function,

opening, 512-514

control properties,

480

controls, 505

441-442

NewLine function, 480

OnRType function, 508

control variables, 442

SetLength function, 479

properties, 506-507

idle processing threads

control shell, 477-478

variables, 508

building, 457-459

event handling, 485-487

#include directives, 510

continuous tasks, 459

events, 489-491

initialization code, 511

OnIdle function, 455

functions

messages

starting, 456

class constructor, 485

receiving, 516-517

stopping, 456

LoadDrawing, 488-491

sending, 515-516

independent threads, 460

OnClick, 487

shell, 505

Main thread function,

OnDraw, 486

socket class

461

#include directives, 481

member variables, 509

starting, 462-463

properties

OnAccept function, 510

stopping, 462-463

adding, 481-482

SetParent function, 509

triggering from view

KeepCurrentDrawing,

sockets, 497

object, 463-464

483

connections

shutdown procedures, 467

NumberSquiggles, 483

closing, 503, 517-519

spinners

property page, 483-485

opening, 500-501,

arrays, 449-450

SquiggleLength, 482

511-514

class declaration,

testing, 491-492

creating, 498-500, 509-511

444-445

SquiggleLength property

error handling, 504

color table, 445-446

(Squiggle control), 482

event handling, 503-504

designing, 443

SQL_FETCH_ABSOLUTE

messages

drawing, 446-447

navigation type (Move func-

listening for, 501

initializing, 452-455

tion), 320

receiving, 502-503,

positioning, 450-452

SQL_FETCH_FIRST naviga-

516-517

source file, 449

tion type (Move function),

sending, 502, 515-516

spinning, 455

320

ports, 498

start/end points, 448-449

SQL_FETCH_LAST naviga-

see also Sock application

variables, 443-444

tion type (Move function),

SORT combo box style, 264

viewpoint, 448

320

sorting FlexGrid control,

spooling print jobs, 659

SQL_FETCH_NEXT naviga-

192-193

Spy++ tool

tion type (Move function),

 

 

320

 

 

SQL_FETCH_PRIOR navi-

766 SQL_FETCH_PRIOR navigation type

gation type (Move function), 320

SQL_FETCH_RELATIVE navigation type (Move function), 320

stack

size, 433 viewing, 693-694

Standard toolbar, 10 start/end pages (print jobs),

647-650

StartDoc function, 659 starting applications

counting timer, 76-77 Menu Designer, 109 OnIdle tasks, 456

Run Program buttons, 42-43 threads, 462-463

StartPage function, 660 statements

catch, 663-664 enum, 571

if, 549 new, 666 return, 546 struct, 559 throw, 666

try, 663-664 typedef, 548

see also directives static library project

class definitions, 385 drawing area, setting, 386 drawings

clearing, 390-391 creating, 386-389 displaying, 389-390 serializing, 390

project module, 384-385 test application, 392-395

static text control, 26 status bars

messages, 273-275 panes, 271-272

stepping through code, see single stepping

Stop buttons, creating browser application,

532-533

counting timer, 79-81

Stop function, 524, 532 stopping

counting timer OnStoptimer function,

77

Stop button, 79-81 OnIdle tasks, 456 print jobs, 657 threads, 462-463

strcpy function, 726 StretchBlt function, 155 strikeout effect (fonts), 127 string manipulation class

case sensitivity, 727 constructor types, 724 formatting, 728-729 manipulation functions, 727 NULL-terminated types,

726

searches, 727-728 size, 725

text, adding, 725 strlen function, 726 struct statement, 559 structures

accessing, 561 defined, 559

ENUMLOGFONTEX, 124 example, 560

LOGFONT, 123 NEWTEXTMETRICEX,

124 OPENFILENAME, 102

SubtractRect function, 714 suspended mode (threads),

433

SuspendSpinner function, 462-463

SuspendThread function, 469 synchronizing threads,

434-435

critical sections, 436 events, 439-440 mutexes, 436-438 semaphores, 438-439

T

tab order (controls), specifying, 30-31

Tab Order command (Layout menu), 30

Tasking application, see Spinner application

TBSTYLE_ALTDRAG toolbar control style, 250

TBSTYLE_AUTOSIZE toolbar button style, 252

TBSTYLE_BUTTON toolbar button style, 252

TBSTYLE_CHECK toolbar button style, 252

TBSTYLE_CHECKGROUP toolbar button style, 252 TBSTYLE_CUSTOMERASE toolbar control style, 250

TBSTYLE_DROPDOWN toolbar button style, 252 TBSTYLE_FLAT toolbar

control style, 250 TBSTYLE_GROUP toolbar

button style, 252 TBSTYLE_LIST toolbar con-

trol style, 250 TBSTYLE_NOPREFIX tool-

bar button style, 253 TBSTYLE_REGISTER-

toolbars 767

DROP toolbar control style,

setting, 135-136

720-721

250

status bars, 273-275

operator overloads, 722

TBSTYLE_SEP toolbar but-

strings, adding, 725

COleDateTimeSpan class,

ton style, 253

TEXT mapping mode, 156

722-724

TBSTYLE_TOOLTIPS tool-

ThreadFunc function, 461,

timers

bar control style, 250

470

clock timer

TBSTYLE_TRANSPARENT

threads

OnInitDialog function,

toolbar control style, 250

arrays, 433

71-72

TBSTYLE_WRAPABLE

clean-up procedures,

OnTimer function, 73

toolbar control style, 250

466-468

counting timer

templates, 707-710

idle processing threads, 431

control variables, 74-75

Test Container (ActiveX con-

building, 457-459

OnChangeInterval func-

trols), 491-492

continuous tasks, 459

tion, 75

TestApp application

OnIdle function, 455

OnInitDialog function,

application shell, 393

starting, 456

76

CTestAppDoc class,

stopping, 456

OnTimer function, 77-79

423-424

independent threads, 431,

starting, 76-77

document functions

460

Stop button, 79-81

DeleteContents function,

creating, 432

stopping, 77

425

main thread function,

defined, 68

GetDrawing, 425

461

IDs, 70-71

OnNewDocument, 424

priorities, 432-433

interval range, 81

Serialize, 425

stack size, 433

maximum number of, 81

drawings

starting, 462-463

TIME_CRITICAL thread

creating, 395

stopping, 462-463

priority, 432

deleting, 396

suspended mode, 433

toolbars, 244-245

saving, 396

triggering from view

attaching to application

viewing, 397

object, 463-464

frames, 247-249

#include directives, 393

synchronizing, 434-435

Build toolbar, 10

view functions, 425-426

critical sections, 436

buttons

testing ActiveX controls,

events, 439-440

adding, 245

491-492

mutexes, 436-438

deleting, 245

text

semaphores, 438-439

icons, 246

buttons, 276

viewing, 697

styles, 252-253

fonts

throw keyword, 666

text, 276

CreateFont function,

ThrowErrno function, 671

combo boxes

125-129

throwing exceptions, 666-667

creating, 260-266

listing available,

ThrowOsError function, 671

event handling, 267-268

122-124, 131-133

tilde (~), 564

placeholders, 262

overview, 122

time-handling classes,

populating, 264

sample application,

718-719

positioning, 263

129-131

COleDateTime class,

resource files, 257-260

selecting, 136-138

719-722

sizing, 276

 

formatting code,

styles, 263-264

768 toolbars

updating, 268-270

TPM_LEFTBUTTON flag,

unions, 714

creating, 246

118

Unlock function, 439-440

borders, 251

TPM_RIGHTBUTTON flag,

unlocking semaphores, 439

child window IDs, 251

118

unsigned int data type, 548

control styles, 250

TRACE macros, 685-687, 708

unsigned long int data type,

CreateEx function, 250

listing, 686-687

548

IDs, 247

output, 687

unsigned short int data type,

toolbar styles, 250-251

tracking mouse coordinates,

548

docking, 253-254

53-55

Update function, 320, 356

hiding, 254

TrackPopupMenu function,

UpdateBoundData function,

OnUpdateViewColorbar

117

370-371

function, 255

TRANSPARENT toolbar con-

UpdateColorbar function,

OnViewColorbar func-

trol style, 250

269-270

tion, 256

TrimLeft function, 727

UpdateData function, 35, 456

ShowControlBar func-

TrimRight function, 727

UpdateWidthCB function,

tion, 255

troubleshooting

269

ShowWindow function,

classes, 708-709

UPDATE_COMMAND_UI

255

hash keys, 710

function, 225-227

loading, 250

menu colors, 240

updating

moving, 10

mnemonic conflicts, 31

combo boxes, 268-270

Standard toolbar, 10

resource leaks, 151

records, 356

status bars

see also debugging

URLs (Uniform Resource

adding panes, 271-272

techniques

Locators)

messages, 273-275

TrueType fonts, listing avail-

displaying, 529-530

toggling on/off, 10

able, 140

specifying, 526-528

WizardBar, 10

try keyword, 663-664

utilities, see tools

tools

try...catch blocks, 207

 

MFC Tracer, 698

turning on/off

 

OLE/COM Object Viewer,

edit boxes, 39-41

V

697

maximize/minimize buttons,

Process Viewer, 697

21-22

 

regsvr32, 183

toolbars, 10

variables

Spy++ tool

TWIPS mapping mode, 156

controls, assigning, 32-33

Messages view, 695-696

typedef statement, 548

CPrintInfo function, 642

Processes view, 697

typefaces, see fonts

data types

Threads view, 697

types, see data types

checking, 691-694

Windows view, 696

 

sizes, 554-555

TOOLTIPS toolbar control

 

values, 547-548

style, 250

U

declaring, 548

TopLeft function, 712

default access permissions,

TPM_CENTERALIGN flag,

 

292

118

underlined fonts, 127

global, 552-553

TPM_LEFTALIGN flag, 118

Uniform Resource Locators,

 

 

see URLs

 

 

UnionRect function, 713

 

WYSIWYG 769

local, 552-553

windows

message, 48

naming conventions, 33,

Windows messages, see mes-

WM_RBUTTONDOWN mes-

554

sages

sage, 48

reference variables, 557-558

WinExec function, 44

WM_RBUTTONUP message,

Variables window (debugger),

Winsock (Windows Sockets

48

692-694

API), 497-498

WM_TIMER message, 68

VERIFY macro, 687-689

connections

workspace

View menu, 107

closing, 503, 517-519

creating, 11-12, 541-543

viewing drawings, 396

opening, 500-501,

defined, 8

GetDrawing function, 397

511-514

WRAPABLE toolbar control

OnDraw function, 397, 426

error handling, 504

style, 250

viewpoints, 448

event handling, 503-504

WS_CHILD style

views, 8

messages

combo boxes, 263

virtual key codes, 65

listening for, 501

toolbars, 251

virtual memory, 702

receiving, 502-503,

WS_DISABLED combo box

visibility of toolbars, 254

516-517

style, 263

menu updates, 255

sending, 502, 515-516

WS_GROUP combo box

toggling, 255-256

sockets, creating, 498-500,

style, 263

 

509-511

WS_HSCROLL combo box

 

see also Sock application

style, 263

W-Z

WizardBar, 10

WS_TABSTOP combo box

wizards

style, 263

 

Class Wizard

WS_VISIBLE style

WaitForSingleObject func-

Member Variables tab,

combo boxes, 263

tion, 463

32

toolbars, 251

Watch window (debugger),

Message Maps tab, 34

WS_VSCROLL combo box

692-694

WizardBar, 10

style, 263

Web browsers, see browsers

WM_CONTEXTMENU mes-

WYSIWYG (what you see is

WebBrowse application

sage, 237

what you get) printing, 641

application shell, 525

WM_KEYDOWN message,

 

buttons

57

 

Back, 531

WM_KEYUP message, 57

 

Forward, 531

WM_LBUTTONDBLCLK

 

Refresh, 533-535

message, 48

 

Stop, 532-533

WM_LBUTTONDOWN mes-

 

URLs

sage, 48

 

displaying, 529-530

WM_LBUTTONUP message,

 

specifying, 526-528

48

 

weight (fonts), specifying,

WM_MOUSEMOVE mes-

 

126-127

sage, 48

 

Width function, 713

WM_MOUSEWHEEL mes-

 

Window menu, 107

sage, 48

 

windows, see menus; dialog

WM_RBUTTONDBLCLK

 

Programming Windows 98/NT Unleashed

—Viktor Toth

Programming Windows 98/NT Unleashed is the ideal reference for anyone creating applications for 32-bit Windows. This authoritative resource delivers what you need to know to design, code, and implement cutting-edge Windows applications. This book brings you up to speed on the enhancements of the Windows environment, including newer technologies, such as programming Microsoft’s Distributed Internet Architecture (DNA) and Active Desktop. This book helps you learn to use common controls to quickly and easily add functionality to your applications. You learn to modify your programs to interact with the outside world using messaging (MAPI) and technology (TAPI) and to create your own Internet applications. The coverage of Microsoft Windows 98 makes the information contained in this book extremely important for all Windows programmers and developers.

$49.99 USA/$71.95 CAN

Intermediate–Advanced

 

ISBN: 0-672-31353-7

984 pages

 

Special Edition Using Visual C++ 6

—Kate Gregory

This book focuses on making you productive with Visual C++ as quickly as possible. It uses a straightforward approach to teaching Visual C++, and this approach enables you to move quickly to more advanced topics such as database capabilities, creating ActiveX controls and documents, and enterprise features. This new version includes coverage of all the new features of version 6, as well as expanding the coverage of such topics as Active Server Pages and Visual C++, memory management, and ActiveX Data Objects (ADO).

$39.99 USA/$57.95 CAN

Intermediate–Advanced

 

ISBN: 0-7897-1539-2

900 page

 

Special Edition Using Visual Studio

—Don Benage and Azam Mirza, et al.

This complete reference and tutorial is for developers who want to learn the new tools and features of the Visual Studio programming suite. With this book, you’ll learn how to use the Developer Studio Integrated Development Environment (IDE) to build Visual C++, Visual J++, Visual Basic, and Visual InterDev applications. The book contains unique coverage that demonstrates cross-tool development and how to build integrated programs and select the best tool for a task. An entire section is devoted to team development topics, such as the new object repository, Project Modeler, and Visual SourceSafe for version control.

$49.99 USA/$71.95 CAN

All levels

ISBN: 0-7897-1260-1

888 pages

Special Edition Using MFC AND ATL

—Cindy Walnum

This complete reference thoroughly explains Microsoft Foundation Classes (MFC) by discussing how MFC works, why certain MFC programming steps are required, and how to solve real-world problems using Microsoft’s classes. This book contains extensive coverage of database programming and the new Windows 95 controls, several advanced topics not covered in other MFC books, and valuable techniques for customizing MFC programs. The CD-ROM includes all the source code, project files, and sample programs from the book.

$49.99 USA/$71.95 CAN

Accomplished–Expert

ISBN: 0-7897-0751-9

888 pages

Add to Your Sams Library Today with the Best Books for Programming, Operating Systems, and New Technologies

To order, visit our Web site at www.mcp.com or fax us at

1-800-835-3202

ISBN

Quantity

Description of Item

Unit Cost

Total Cost

 

 

 

 

 

 

0-672-31353-7

 

Programming Windows 98/NT Unleashed

$49.99

 

 

 

 

 

 

 

0-7897-1539-2

 

Special Edition Using Visual C++ 6

$39.99

 

 

 

 

 

 

 

0-7897-1260-1

 

Special Edition Using Visual Studio

$49.99

 

 

 

 

 

 

 

0-7897-0751-9

 

Special Edition Using MFC and ATL

$49.99

 

 

 

 

 

 

 

 

 

 

Shipping and Handling: See information below.

 

 

 

 

 

 

 

 

 

 

 

TOTAL

 

 

 

 

 

 

 

 

Shipping and Handling

Standard

$5.00

2nd Day

$10.00

Next Day

$17.50

International

$40.00

201 W. 103rd Street, Indianapolis, Indiana 46290 1-800-835-3202 — Fax

1Book ISBN 0-672-31240-91

Resource Centers

Books & Software

 

WWW Yellow Pages

 

Online Learning

 

Special Offers

Choose the online ebooks

Site Search

that you can view from your

 

 

Personal Bookshelf

 

personal workspace on our site.

Industry News

 

About MCP

Site Map

Product Support

 

Turn to the Authoritative

Encyclopedia of Computing

You'll find over 150 full text books online, hundreds of shareware/freeware applications, online computing classes and 10 computing resource centers full of expert advice from the editors and publishers of:

• Adobe Press

• Que

• BradyGAMES

• Que Education & Training

• Cisco Press

• Sams Publishing

• Hayden Books

• Waite Group Press

• Lycos Press

• Ziff-Davis Press

• New Riders

 

 

 

 

 

 

 

 

The Authoritative Encyclopedia of Computing

When you’re looking for computing information, consult the authority. The Authoritative Encyclopedia of Computing at mcp.com.

Get the best information and learn about latest developments in:

Design

Graphics and Multimedia

Enterprise Computing and DBMS

General Internet Information

Operating Systems

Networking and Hardware

PC and Video Gaming

Productivity Applications

Programming

Web Programming and Administration

Web Publishing

Sams Teach Yourself Visual C++ 6 in

21 Days

DAY 1

Become familiar with the Visual C++ development environment by building a simple application.

DAY 8

Learn how to draw graphics in a Windows application.

DAY 15

Learn about Microsoft’s latest database access technology, ActiveX Data Objects (ADO), and how you can incorporate it into your Visual C++ applications.

DAY 2

Learn about the standard controls used in Windows applications, how you can place and configure them on an application window, and how you can interact with them.

DAY 9

Learn how easy it is to incorporate ActiveX controls into your applications.

DAY 16

Learn how to build your functionality into library modules that you can give to other Visual C++ programmers for use in their applications.

DAY 3

Learn how you can capture mouse and keyboard events and react to them in your applications.

DAY 10

Learn how to build a basic Single Document Interface (SDI) application and how to use the Document/View architecture.

DAY 17

Learn how to build two different types of DLLs.

DAY 4

Learn how to work with timers in a Visual C++ application. Learn how to have two or more timers running at the same time and how you can tell them apart.

DAY 11

Learn how you can build Multiple Document Interface (MDI) applications.

DAY 18

Learn how you can enable your applications to work on two or more separate tasks at the same time.

DAY 5

Learn how you can use some built-in dialogs to ask the user simple questions and how you can build your own custom dialogs to get more detailed information from the user.

DAY 12

Learn how you can create and modify your own toolbars and status bars.

DAY 19

Learn how you can build your own ActiveX controls that can be used in other applications or even in Web pages.

DAY 6

Learn how to create menus to add to your application.

DAY 13

Learn how you can use the structure provided for you by the Document/View architecture to save and restore the data created in your application.

DAY 20

Learn how Internet applications communicate with each other using the Winsock interface and how you can make your applications communicate over a network.

DAY 7

Learn about the font infrastructure in Windows and how you can access it in your Visual C++ applications.

DAY 14

Learn how easy it is to build a database application using an ODBC database.

DAY 21

See how easy it is to incorporate the Microsoft Internet Explorer Web browser into your own Visual C++ application.

Microsoft Foundation Class Hierarchy - Version 6.0

 

 

CObject

 

 

 

 

 

 

Classes Not Derived from CObject

 

 

 

 

 

 

 

 

 

Graphical Drawing

 

Arrays

 

 

Internet Server API

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CHtmlStream

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDC

 

 

 

 

CArray(Template)

 

 

 

CHttpFilter

 

 

 

 

 

 

 

 

 

 

 

 

CClientDC

 

 

CByteArray

 

 

 

CHttpFilterContext

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMetaFileDC

 

 

CDWordArray

 

 

 

CHttpServer

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPaintDC

 

 

CObArray

 

 

 

CHttpServerContext

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CWindowDC

 

 

CPtrArray

 

 

 

Runtime Object Model Support

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Control Support

 

CStringArray

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CUIntArray

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CWordArray

 

 

 

CArchive

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDockState

 

 

 

 

 

 

 

 

 

 

CDumpContext

 

 

CImageList

 

 

 

 

arrays of user types

 

 

CRuntimeClass

 

 

 

 

 

 

 

 

 

 

Graphical Drawing Objects

 

Lists

 

 

Simple Value Types

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CGdiObject

 

 

 

 

CList (Template)

 

 

 

CPoint

 

 

 

 

 

 

 

 

 

 

 

 

 

CBitmap

 

 

CPtrList

 

 

 

CRect

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CBrush

 

 

CObList

 

 

 

CSize

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CFont

 

 

CStringList

 

 

 

CString

 

 

 

 

CPalette

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

lists of user types

 

 

CTime

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPen

 

 

 

 

CTimeSpan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRgn

 

 

Maps

 

 

Structures

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Menus

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMap (Template)

 

 

 

CCreateContext

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMenu

 

 

 

 

CMapWordToPtr

 

 

 

CMemoryState

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command Line

 

CMapPtrToWord

 

 

 

COleSafeArray

 

 

 

 

 

 

 

 

 

 

 

 

 

CMapPtrToPtr

 

 

 

CPrintInfo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMapWordToOb

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCommandLineInfo

 

 

 

 

CMapStringToPtr

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ODBC Database Support

 

CMapStringToOb

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMapStringToString

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

maps of user types

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDatabase

 

 

 

 

Internet Services

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRecordset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

user recordsets

 

 

 

 

 

 

 

 

 

 

 

 

 

CInternetSession

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CInternetConnection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CLongBinary

 

 

 

 

 

 

CFtpConnection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DAO Database Support

 

 

 

CGopherConnection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CHttpConnection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CFileFind

 

 

 

 

 

 

CDaoDatabase

 

 

 

 

 

 

CFtpFileFind

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDaoQueryDef

 

 

 

 

 

 

CGopherFileFind

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDaoRecordset

 

 

 

 

CGopherLocator

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDaoTableDef

 

 

 

 

Windows Sockets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CDaoWorkspace

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Synchronization

 

 

 

 

 

 

 

 

 

 

 

CAsyncSocket

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CSocket

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CSyncObject

 

 

 

 

 

 

 

 

31240-9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CCriticalSection

 

 

 

 

 

 

 

 

MFC2.eps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CEvent

 

 

 

 

 

 

 

 

 

LP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMutex

 

 

 

 

 

 

 

5/19/20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CSemaphore

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Support Classes

CCmdUI

COleCmdUI

CDaoFieldExchange

CDataExchange

CDBVariant

CFieldExchange

COleDataObject

COleDispatchDriver

CPropExchange

CRectTracker

CWaitCursor

Typed Template Collections

CTypedPtrArray

CTypedPtrList

CTypedPtrMap

OLE Type Wrappers

CFontHolder

CPictureHolder

OLE Automation Types

COleCurrency

COleDateTime

COleDateTimeSpan

COleVariant

Synchronization

CMultiLock

CSingleLock

Davis Chapman

Teach Yourself

Visual C++® 6

in 21Days

A Division of Macmillan Computer Publishing 201 West 103rd St., Indianapolis, Indiana, 46290 USA

Соседние файлы в предмете Программирование