Turbo Pascal for Windows 3.0 Programming Copyright (C) 1991 by Tom Swan. All rights reserved. Index #include directive, 284, 424 $A Align data, 826 $B Boolean evaluation, 826 $C Code directive, 831 $D Embed text directive, 829, 831 $D Debug information, 826 $F Force far calls, 727, 826 $G 286 code, 826 $I Include directive, 831 $I I/O checking, 284, 744, 826 $L Link directive, 831 $L Local symbols, 826 $M Memory directory, 560, 830, 832 $N 80x87 code, 826 $R Resource directive, 375, 529, 710, 832 $R Range checking, 827 $S Stack checking, 737, 827 $V String var checking, 827 $W Stack frame, 827 $X Extended syntax, 827 .BMP file, 299, 346, 351, 749 loading and displaying, 355-362, 810 reading, 354 .CUR file, 388 .DLG file incorporating into resource script file, 427 .DLL file, 713, 732, 829, 831-832 .DRV file, 649, 680 .EXE file, 713, 829, 830-832 .ICO file, 364 .INC. See Include files .INI file, 627 .MAP file, 833 .OBJ file, 831. See also Object code files .RES file, 388, 832. See also Resource file .TPU file, 713, 828-830, 832-833 /B Compile:Build, 829 /D Options:Compiler, 829 /E Options:Directories, 829 /F Search:Find error, 829 /GD Options:Linker, 829, 833 /GP Options:Linker, 829, 833 /GS Options:Linker, 829, 833 /I Options:Directories, 829 /L Options:Linker, 829, 833 /M Compile:Make, 829 /O Options:Directories, 829 /Q Quiet, 829 /R Options:Directories, 829 /T Turbo, 830 /U Options:Directories, 830 /V Options:Linker, 830 80286, 6, 8, 826 80386, 6, 8, 22, 51, 826 determing whether computer has, 84 80386SX, 22 80486, 6, 8, 826 8086, 8 8088, 8 @Self, 108 passing to TDialog's Init constructor, 431 purpose of, 431 A Abort callback procedure, 687, 689 Abort dialog, 687, 689, 692-694, 697 creating, 688 using, 698 Abort procedure, 689, 692, 697 installing, 691 AbortDoc, 654 AbortProc, 690 About Box dialog, 438, 642 displaying, 440 displaying using Application^.ExecDialog, 444 icon, displaying inside, 439 About command adding to system menu, 265 About... menu command, 438 Abstract object, 578 Accelerated commands nonstandard Windows applications, 279 Accelerator associating with specific command, 284 Accelerator command flashing, 280 Accelerator editor, 279-281 Accelerator key labels displaying, 281 Accelerator keys, 666 Accelerator label adding to a command, 281 Accelerator labels aligned, 281 Accelerator resource, 277, 279 creating multiple-key, 280 defined, 278 loading and using, 282-283 returning a handle to, 282 table, 279, 288 using ASCII keys for, 278 using virtual key codes for, 278 Accent, 550 Actor, 13, 42, 710 Address invalid, 71 Address-of operator (@), 75, 91, 447, 738 using two, 734 AddString, 590-591, 602-603 After Dark screen blanker, 23 AHIncr, 351 Alias creating, 90 AllocMultiSel, 609 Ampersand character (&), 143, 232 Ancestor method calling, 117 Ancestor object pointer, 118 Ancestor objects pointers to, 585 Animated graphics program, 212 ANSI character set, 749 AnsiNext, 661 ansi_Fixed_Font, 182 ansi_Var_Font, 182, 345 API (Windows Application Program Interface), 12, 15-16, 729 AppendMenu, 251, 256, 263, 265, 271-272, 275, 339, 346 creating new menu from scratch, 275 declared, 251-252 preference over InsertMenu, 254 Application detecting when minimized, 380 distinguishing between multiple, 158 global pointer, 611 global typed-constant pointer, 130 locating messages belonging to, 550 minimized, 376 startup sequence, 156 Application framework, 122 Application global variable, 431 Application main window dialog as, 602 Application menu bar, 333 Application message queue, 550, 552 Application queue, 550 Application window minimized to icon, 379 Applications time, giving most to, 552 Array pointers to string constants, 502 Array of bytes to create bitmaps, 331 Array of characters, 71 Arrays of Char, 91 Arrow, 399 default shape, 401 ASCII keys, 278 ASCII null, 71 ASCII text, 749 ASCIIZ string, 88, 93-95, 99, 100, 101, 110, 112, 132, 141, 193, 367, 628, 720. See also Null terminated strings and PChar comparing two, 98 concatenating (joining) two, 97 converting length-byte strings to, 97 converting to length-byte variety, 98 copying two, 95 creating space for, 100 displaying, 205 emptying, 95 finding length of, 94 length, 88 passing to procedures and functions, 91 ASCIIZ string copy functions, 96 Assembly language, 710, 831 Assign, 84, 86 AssignCrt, 77 Atom, 772-773, 776-778, 785, 793 Atom table deleting from, 774 Attr, 139, 149 Auto scrolling, 189. See also TScroller inhibiting, 77 AUTOEXEC.BAT, 25-27, 49 AutoTracking, 77 AWndClass, 375, 400 AWndClass.Style, 194 B Background erasing, 329 running program in, 380 showing through cursor's image, 388 Background color, 187-188 erasing the client area, 201 Background pattern, 325 bf_Checked, 607 bf_Grayed, 607 bf_Unchecked, 607 Bit blasting, 301 BitBlt, 301, 305-307, 311-312, 314, 318-320, 347, 361-362, 377, 673, 678 declared, 304 Bitmap attribute options, 300 converting to a brush structure, 320 copying into memory, 306 creating, 300 creating at runtime, 298 creating offscreen, 314, 318 creating uninitialized device-dependent, 332 defined, 297 deselecting from a DC, 303 displaying, 302, 360 displaying onscreen, 307 dumping contents in hexadecimal, 227 inserting into a menu, 264 loading and displaying, 300 maximum size, determining, 346 minimum size to display string, 345 printing, 678, 699 selecting the same twice, 320 three main ways to create, 298 Bitmap data in the clipboard, 762 Bitmap editor, 298, 300, 308, 321 Bitmap files reading and displaying, 346 Bitmap handle, 339 obtaining, 302 Bitmap pattern, 253 Bitmap resource, 299, 311, 313 and backgrounds, 325-329 and brushes, 320-324 and display contexts, 301 and-xor method for displaying, 366 as a checkmark in menu item, 329 color, 298 creating inside program listing, 331 deleting, good place to, 311 displaying, 312, 359 displaying color on monochrome, 305 displaying inside visible window, 362 drawing into, 304-306, 312-320 importing from clipboard, 768 large, 338 loading into memory, 302 monochrome, 298, 332 preparing for drawing, 312 small-font, 340, 344-345 using as a brush, 320 blackness, 305 black_Brush, 182 black_Pen, 182 Blank bitmap, 313 Blank icon, 371, 378 Block transfer, 301 BlockRead, 84, 351 BlockWrite, 84 bm_GetCheck, 435, 437, 466, 479 bm_SetCheck, 434-435, 466, 477 bn_Clicked, 583, 606 bn_DoubleClicked, 583 Bool, 202 Boolean data type equivalents, 202 Boolean expressions evaluating complex, 34 results of combining pixels, 305 Borland C++, 14 Borland International, 3 Borland Language Express, 618 Breakpoints setting, 52-53 setting for specific message, 54 Brush creating from the bitmap, 320 custom, using as a window background, 328 Brush handle, 325 Brush pattern, 208 using different, 325 Brushes and bitmaps, 320-324 creating and selecting, 207 identifying by handles, 323 selecting, 206-212 Bugs hunting for, 53 Busy display organizing, 586 Button moving focus to selected, 478 pressing Enter and Esc to select, 584 setting ws_Tabstop style bit, 478 text inside of, 582 Button groups tabbing among, 466 Button label altering, 464 changing, 423 Button selections, 579 C C headers converting to Pascal, 729 C library functions, 744 C programming language, 89, 710, 837 C programs converting to Pascal, 71 C++, 13 C++/Views, 14 Callback functions, 171, 687, 690, 744 Cancel button, 432, 446, 462-463, 479, 483, 542, 547-549, 553, 579, 663, 688, 690, 692, 698 Cancel method, 428, 547 CanClose, 450-451, 461, 465, 489, 542, 822 and printing, 693 retrieving text from edit control, 482 to prevent loss of data, 540 Caption. See Window title CascadeChildren, 822 Cascaded menus. See Multilevel menus cb_AddString, 503 cb_Err, 503 cb_GetCurSel, 503 cb_GetLbText, 504 cb_GetLbTextLen, 503 cb_LimitText, 503 cf_Bitmap, 749 cf_DIB, 749 cf_DIF, 749 cf_MetaFilePict, 749 cf_OEMText, 749, 757 cf_Sylk, 749 cf_Text, 749, 757-758, 777 cf_Tiff, 749 Changes undo, 31 Chapters about, 17-19 Character copied from control, 596 double quote, entering, 517 Character array constants, 92 Check, 586 proper place to call, 588 Check box, 435, 466-480, 616 creating, 472 current state of, 586 initializing, 477 initializing a group, 470 retrieving, 470 retrieving values, 479 single, 585 storing in 16-bit Pascal sets, 470 storing in sets, 477 turn on by default, 610 Check box control, 437 communicating with, 477 creating, 584 methods to call for, 586 responding to events generated by, 480 retrieving status of, 435 sending a message to, 430 Check box events, 586 CheckBreak, 71 CheckEOF, 72 Checkmark. See also Menu command creating custom, 331 custom bitmap, 338 deleting from box, 586 displaying, 242 displaying in box, 586 method to add and remove, 263 removing, 242 using bitmap in a menu item, 329 width and height, 330 Checkmark commands responding to, 244 Checkmark dimensions, 332 Checkmark pattern attaching custom to menu, 334 Checkmarked, 253 Checkmarked commands, 231 Checkmarked menu items enhancing, 333 CheckMenuItem, 240, 249, 265 declared, 241 Child detecting close, 574 Child and popup windows. See also Child windows creating, 562-575 disposing, 567 types, 562-563 Child control windows, 437, 603, 631 displaying, 445 initializing to the values in, 611 managing, object-oriented approach, 602 storing in the transfer buffer, 607 Child ID message, 583 Child objects, 541, 617 Child window constructor, 572 Child window handle, 573 Child window object, 572 Child windows, 537-538, 562, 564 address of previous, 596 closing explicitly, 567 command response methods, 816 custom message handlers for, 537 displaying an icon for, 818 in DDE conversation, 772 inside MDI frame window, 805 menus, 566 minimized as icons, 805 notifying parents, 573 represented by objects, 537 ChildList, 572, 807, 819 ChildMenuPos, 816-817 Class cursor, 390, 400 Class icon, 371-372, 379, 439 included in OWL program, 375 using LoadIcon to specify, 376 Clear command, 768 Clicking and Dragging, 402-413 Client, 772, 779, 785-786, 792, 795 honor request for information, 777 Client area, 185, 360, 401, 705. See also Window, client area accounting for size while scrolling, 704 and child windows, 563 controls placed inside, 425 mouse pointer within, 391 providing scrolling services to, 703 Client window, 776, 808 obtaining handle, 807 Client server relationship, 771-772. See also DDE Clients, 775 ClientToScreen, 275 declared, 275-276 Clipboard, 747-748 emptying, 750 extracting bitmap data from, 762 extracting bitmaps from, 770 opening and closing, 749-750 retrieving text stored in, 756 text, finding whether it has, 757 transferring text into, 755 Clipboard data creating memory block to hold, 750 dealing with, 753 most common format, 749 pasting to an edit control, 434 second most common format, 762 Clipboard data transfers, 750 Clipboard formats, 775-777 Clipboard memory block returning number of characters, 759 Clipboard viewer, 748, 753, 759, 762 ClipCursor, 418-420 Clipping, 165 essential element of Windows, 165 CloseClipboard, 489, 750, 752, 770 CloseWindow, 154-155, 361, 542, 548, 567, 584 Closing techniques deviations from standard, 432 CmdLine, 65 cm_FilePrint, 666 cm_First, 136-137, 152, 231-232, 238, 248, 252, 430, 440 cm_Internal, 137 cm_TileChildren, 807 Code segment, 727 attributes, 831 swapping in and out of memory, 718 CodeView debugger, 12, 47 Collection of strings, 608 Color, 640. See also System color choosing good-looking, 186 coordinating, 627 painting solid, 206 selecting, 186-188 selecting automatically, 643 simplest method for choosing, 186 Color combinations, 641 Color printers, 678 Color settings, 623 Color utility, 627 Color value obtaining for screen element, 626 color_Background, 626 color_Highlight, 627 color_Menu, 627 color_Scrollbar, 627 Columnar menus, 231 Combo box, 501-511, 597 adding strings to list portion, 597 creating, 597 getting length of selection, 503 initialization, 597 labeling with static text control, 501 retrieving selections from, 503 types of, 501, 505 Combo box control object creating, 578 initializing contents, 502 Combo box list adding string to, 511 Combo box selections storing at runtime, 503 Combo box style, 501 COMMAND.COM, 25 Command-line compiler, 37-39, 825 configuration file, 42 limitations, 38 Command-line parameters, 32, 65 Command name changing, 264 Command response method, 231-233, 248, 252, 263 and the accelerator key, 283 and the system menu, 266 Commands changing state of, 462 disable, 462 disabling selected, 250 displaying in grayed out style, 256 enabling or graying, 768 gray, 462 inserting new in a menu, 252 number in a menu, 264 passing along unprocessed, 267 preventing inappropriate selection, 257 Common User Access. See CUA Communicating with controls, 479 Compatible bitmap, 319 Compatible DC, 319. See also Memory DC Compilation speed, 829 Compile large programs, 38 Compile menu, 33 Compiled code and DLL's routines, 717 Compiled programs running, 39-40 Compiler options, 33, 825-832 Compiling trouble, 41 wrong program, 33 Concat, 87 Conditional compilation, 124-125, 828 CONFIG.SYS, 24-25 Configuration printer, 648 Configuration file editing, 42 integrated environment, 42 Constructor, 108-112 key word, 109 multiple, 109 Control activity inside, 592 automatic selection of text in, 499 copying text, 498 default features, customizing, 603 hiding and showing, 589 highlighting text in, 499 ID used to close dialog, 432 initializing, 479 inserting text for editing, 482 Item Attributes Item ID field, 432 maximum characters to use, 482 retrieving style, 478 saving a pointer to, 581 sending messages to, 435 Control events, 586, 603 responding to, 583 Control IDs predefined, 432 Control in a parent window virtual index for, 583 Control object, 578, 580 creating, fundamental steps in, 579 default style option, 578 disposing of, 584 handling its own messages, 603 initializing, 603 initializing dialog's, 602 initializing to values in transfer buffer, 617 responding to events generated, 603 restoring values, 607 saving values, 607 Show method, 589 simplest, 579 storing a pointer to, 584 transfer mechanism, 578 transferring data to and from, 611 Control object child windows enabling keyboard support, 584 Control object constructor, 599 Control Panel, 655, 660, 680 printer settings, default, 650 using to change printer, 654 Control Panel Color program, 187, 617 Control Panel Mouse utility, 192 Control Panel Printer utility, 656 Control resource, 436 Control types six standard, 425 Control values keeping, 470 packing in small space, 470 storing, 616 Control window obtaining handle to, 435 shifting focus to another, 432 Control window style bits, 594 Control windows adding text, 481 messages generated by, 480 Control text, erasing, 589 Control actions message response method to handle, 582 Control identifier storing the, 566 Control initial value quoted text used as, 593 Control message response method, 592 Control parent window handle, use of correct, 437 Controls, 423, 433. See also Dialog box as highly specialized child window, 577 communicating with, 436, 510 copying data from transfer buffer, 611 how Windows groups, 468 identifying by handles, 478 identifying numerically, 425 Item Attributes, 426 parents, must have, 582 passing information, 435 restriction to dialog boundaries, 425 scroll bars in, 425 shift-clicking, 426 sibling, in windows, 623 Controls in dialogs, 426-427 tabbing trick, 468 Controls in windows, 577 Controls without resources, 617-643 Conventional programming techniques in an event-driven environment, 134 Conversation. See also DDE broken, trick to prevent, 794 ending, 778 establishing between client and server, 775-777 permanent DDE, 794 starting, 793 Coordinate values storing display, 275 Coordinates converting local to global, 275 pixel-based, 140 Copy, 87 Copy command, 747, 761, 768 implementing, 753 Copyright notice, 831 Copyright symbol (©) to type, 438 Create method, 579 CreateBitmap, 332 declared, 332 CreateCompatibleBitmap, 345, 346, 377, 770 declared, 313 CreateCompatibleDC, 302, 306-307, 311-312, 318, 361, 649, 678 CreateCursor declared, 420 deleting cursor created by, 420 CreateDC, 354, 652-656, 662, 697 declared, 649-650 CreateDIBitmap, 354 CreateHatchBrush, 206, 208, 211 declared, 207 CreateMenu, 263 CreatePatternBrush, 320, 323 CreatePen, 178, 181, 185, 187 declared, 178-179 CreatePopupMenu, 256, 271-272, 275 declared, 255 CreateSolidBrush, 206-207, 211, 346 declared, 206 CreateWindow, 566 CRT screen vs. printer, 646 cs_ByteAlignClient, 195 cs_ByteAlignWindow, 195 cs_ClassDC, 195 cs_DblClks, 194-195, 583 cs_GlobalClass, 195 cs_HRedraw, 194-195 cs_NoClose, 195 cs_OwnDC, 195 cs_ParentDC, 195 cs_SaveBits, 195 cs_VRedraw, 194-195 CUA (Common User Access), 11, 34, 136, 805, 837 Cursor, 176. See also Mouse pointer animating, 414, 420 changing to hourglass, 413 defined, 388 loading, 398 moving, 419 restoring to custom shape, 401 storing in multiple formats, 388 Cursor bitmap, 399 custom, 401 Cursor clipping resetting to normal, 419 Cursor editor, 388, 392, 420 Cursor functions, 418 Cursor hot spot, 411 filling TPoint record with, 419 Cursor keys use to shift focus, 586 Cursor movement restricting, 418 Cursor movements, 391 Cursor position getting, 419 Cursor resource displaying, 390 identifying, 389, 397 Cursor shape changing, 401, 409 changing the current, 397 modifying, 391 Cursors built-in, 393 creating at runtime, 420 using custom and stock, 392-397 CursorXY, 77 Custom backgrounds, 326 Custom checkmark. See also Checkmark using a bitmap as, 330 Custom cursor loading, 398 Custom menu item, 253 Custom scroll bar, 634 Custom scroll bar objects, 640 Custom system menus, 231 Cut command, 747, 761, 768 D Data sharing for unrelated programs, 747 Data formats storing in clipboard, 748 Data Interchange Format. See DIF Data overlay, 514 Data segment, 99, 338, 744, 832 global variables and stack, 712 used by DLL, 711 Data segment register, 691 Data transfer buffer, 610 initializing, 610 Data entry screens, 492 DC. See also Display context retaining control over, 408 DDE, 771 ending a conversation, 778-779 links: cold, warm and hot, 794-795 sending and receiving data, 777-778 starting a conversation, 775-777 DDE (Dynamic Data Exchange),354, 747 DDE conversations, 771-802 PostMessage vs. SendMessage, 777 DDE links warm and hot, 772 dde_Ack, 793 Dead character, 550 Debug info, 833 Debugging, 826, 828, 830, 833, 838 and overriding DefNotificationProc, 606 printing strategic information, 649 Debugging printer output, 655 Default arrow restoring, 413 Default button, 579 positioning cursor over, 420 Default printer, 654. See also Printing Default pushbutton, 582 Default window class changing, 193 default_Palette, 182 DefNotificationProc, 603, 606, 632 calling inherited method, 606 overriding TButton's, 605 DefWndProc, 53, 267, 289, 480, 595 overriding, 594 Delete, 87 DeleteDC, 653, 663 DeleteMenu, 254-256, 263, 270 declared, 254 DeleteObject, 180-181, 185-186, 300, 311, 420 and brushes, 324 DeleteString, 602 DemandLoad, 831 Descendant object, 112-113. See also Object Descendant pointer, 118-119 Desktop displaying icons on, 371-379 DestroyMenu, 256, 272 Destructor, 108-112 implementation, 111 multiple, 109 Development system ideal, 22 Development tools traditional Windows, 11-15 Device initialization parameters, 680 Device context, 164. See also Display context handle to, 650 printing, 697 Device context handle, 662, 672 obtaining, 652 Device driver, 9, 24, 649 sending print commands directly to, 656 Device driver file name, 721 Device drivers calling FreeLibrary, 687 DLLs in disguise, 711 older version 2, 687 Device independence, 9 Device name, 655 Device dependent bitmap, 297-299, 303, 313, 332, 749 as icons, 364 Device independent bitmap. See DIB Device independent graphics, 672 Device independent printing. See Printing Device independent programming, 186 DeviceMode, 687 device_Default_Font, 182 Dialog. See also Modal dialog and Modeless dialog activating, 441 activating with single statement, 431 as application's main window, 602 closing, 432 closing, creating custom, 432 closing, providing means to, 467 common window, 562 control ID used to end, 431 Create method, 540 different method for bringing up, 440 display progress reports, 549 displaying, 441 edit control box, 449 end, test for external condition, 549 ending, 427 icon control in, 439 input focus, 432 keystrokes, processes, 547 message, intended for, 549, 552 registering as window class, 562 SetFocus, 549 Show method, 549 System Menu Switch, 427 Dialog and control objects, 572 Dialog and its controls interfacing with, 497 Dialog Attributes window, 426 Dialog box, 11, 140, 366, 423, 538 designing, 470 using control objects, 598 Dialog box title, 141 Dialog caption changing, 464 Dialog controls passing string to, 549 Windows taking charge of, 433 Dialog creation, 428 Dialog editor, 424, 426, 431, 434-435, 467-468, 481, 490, 501 Dialog instances storing on heap, 429 Dialog menu Show Item ID, 427 Show Tab Order, 427 Dialog object and interface element, 540 initializing, 441 Dialog resource, 538 identifying uniquely, 446 name, 430-431 Dialog script including, 424 Dialog window, 452 Dialog window title changing, 547 Dialog caption, 426 Dialog controls keeping track of values, 429 Dialog resource template for TDialog, 429 Dialog setting. See also Transfer Buffer keeping track, 479 Dialog window setting focus, 688 Dialogs behaving like windows, 599 controls in different, 425 creating to interact with list controls, 492 creating using script-commands, 424 designing interactive, 481 designing useful, 499 difference between windows and, 428 handling complex, 445 interactive, 480 keyboard support in, 466 used as data-entry screens, 489 using transfers, 607 well-designed, 466 writing interactive, 483 DIB (device independent bitmap), 297, 299, 749 main advantage of, 299 DIF (data interchange format), 749 Digital readout updating scroll bar, 632 Direction value, 611 Directory displaying, 553 DisableAutoCreate, 567 DISCARDABLE, 516 Discardable, 831 Discardable memory, 548 Disk cache, 24 Disk file directing printer output to, 650 Disk files, 452 Disk space shortage of, 690 DispatchMessage, 417, 550-551, 690 declared, 552 Display scrolling automatically, 77 speeding up complex patterns, 312 Display context, 164, 166, 168-169, 177-178, 185, 303, 312, 328, 649, 705. See also Memory DC and bitmaps, 301 attaching pen to, 179 drawing into an uninitialized, 409 obtaining, 169-170, 176 obtaining for a window, 303 obtaining from Windows, 175 releasing, 177 selecting newly created brush, 207 using new font in, 345 Display resolutions, 365 switching, 29, 49-50 Displaying boxes and buttons, 586 Dispose and destructor, 110 Disposing modeless dialogs, 541-542 Dithered colors, 187 mixed from other solid colors, 641 Window's rejection of, 642 dkGray_Brush, 182 DLL (Dynamic Link Library), 649, 679, 707-745 adding entry and exit code to, 739 advantages and disadvantages, 710 communicating with programs, 744 data segment, maximum size, 711 defined, 708 exit code, adding automatic, 737 exiting procedures in, 827 interfacing your code with, 709 loads and discards, control over, 732 multiple startup sections, 738 name conflicts, 728 searching for specific by name, 725 shareable, 721 shell for housing, 723 startup code, 736 startup-order dependencies, 738 DLL code file, 728 DLL Code file loading into memory, 732, 743 DLL file name, 733 DLL instance, 712 DLL restrictions, 743-744 DLL routines importing dynamically, 734 searching by name, 728 values, persisting between calls, 722 DLL runtime error, 744 DLL source file, 711 DLL subroutine interfacing to, 715 DLL exit code, 736, 743 DLL file name, 732 DLL startup block signalling an error inside, 741 DLL startup code, 738 DLL subroutines converting for use by TPW, 730 DMT (dynamic method table), 136 dm_Copy, 681-682, 687 dm_Modify, 681 dm_Prompt, 681, 687 dm_Update, 681 Done destructor important step, 324 DoneWinCrt, 72 DOS running programs that use mouse, 26 DOS and Windows converting code between, 122 DOS command, 795 DOS debug, 655 DOS disk error, 686 DOS programs translating for Windows, 64 DOS TSR. See TSRs DOS Turbo Debugger, 46, 50 DOS Turbo Pascal, 9, 13-14, 26, 64-65, 69-70, 73-74, 84, 87, 101, 120, 122, 546, 647 Crt unit, 69, 73, 77 file-handling techniques in, 463 tutorial, 838 DOS utilities online help, 55 Dot notation, 103, 116 Dot-matrix printers, 652, 673 Double border window creating, 565 Double Click Speed interval, 192 Double clicking, 192-194, 454 button response, 583 Dragging and clicking, 402-413 DrawIcon, 377, 379 declared, 376 Drawing preparing bitmaps for, 312 Drawing and erasing, 402 Drawing mode, 409 preserving current, 219 selecting, 403 DrawMenubar, 339 DrawMenuBar, 254-258 declared, 254 DrawText, 201 Driver file getting name of, 679 Driver settings default, 653 Drivers extended capabilities of ver 3.0, 686 Drop down box, 501, 503 dstInvert, 305 Dual monitor setup, 48 Dynamic Data Exchange. See DDE Dynamic icon good use for, 380 Dynamic importing, 725-726, 732-736, 738. See also DLL example, 734 Dynamic Link Library. See DLL Dynamic linking, 709, 726 Dynamic menu routines, 263-265 Dynamic menus, 231, 249 programming, 258-265 Dynamic method index, 101 Dynamic method table. See DMT Dynamic text object, 589 Dynamic virtual method, 121 E Edit, 481 Edit control, 433, 482, 501, 579 593 Auto HScroll option, 481 getting text, 482 interactive, 483 kinds of, 481 retrieving edited text, 489 sending text to, 489 single- and multiline, 480-489 storing text entered into, 488 two kinds, 592 Edit control resources creating, 481 Edit dialog sample, 483-489 Edit menu, 31, 279, 747 Edit window, 597 Editing options, 34 Editor creating sophisticated, 663 EGA display, 25 Ellipse, 168, 402, 409, 649, 672, 708-709 drawing, 168 EMM386.SYS, 25 EmptyClipboard, 489, 750, 752, 758 em_InvalidChild, 540 em_InvalidClient, 540 em_InvalidMainWindow, 540 em_InvalidWindow, 540 em_LimitText, 482, 498 em_SetSel, 451-452, 499 EnableAutoCreate, 539, 541 EnableKBHandler, 547, 584, 586 EnableMenuItem, 257-258, 265 EnableTransfer, 611 Encapsulating data and code, 450 primary reason for, 103 Encapsulation, 102 EndDoc, 653-654, 663, 693 Enhanced mode, 8, 351, 513, 827 Entry and exit code in DLLs, 736 Environment for specific outport port, 682 Eof, 84 Epson printer, 650 EPSON9.DRV, 652 Error, 540 constants, 540 Error handling, 100, 648 Error message, 363, 518, 648 displaying, 160 Error message box, 452 Error message dialog, 461, 540 Error messages, 37, 517 redisplaying most recent, 32 string tables, 514 Error values from Escape, 651 Errors, Printing detecting using DOS, 648 Escape, 650-654, 656, 660, 662-663, 689, 691-692, 697 declared, 651 Escape code, 281 Escape codes, 653-654 es_AutoHScroll, 594 es_AutoVScroll, 594 es_Left, 594 es_Multiline, 594 Event, 132 simulating, 640 Event driven programming, 122, 133-136, 537 Events, 10, 15 responding to, 134 scroll bar, 632 ExecDialog, 431-433, 440, 464, 479, 498, 539, 562, 578, 611 inspecting result of, 454 Exit chain, 737. See also DLL exit code Exit code, 744 Exit command appending to a menu, 251 Exit procedure, 737-739, 742 Exit... constants, 65 ExitCode, 739, 741 ExitProc, 737-739 ExitProgram, 795 Expanded memory, 8 Export, 722 procedure directive, 690, 692, 711, 713 Export declaration, 718 Export directive, 713-715 Exportation simplest form, 723 Exported procedures, 713 Exported routine alias name for, 724 name index, 725 Exports section, 711, 714-715, 723, 725, 728 and multiunit DLLs, 724 Expressions folding (evaluating) during compilation, 135 ExtDeviceMode, 679-682, 686 Extended memory, 8, 22, 24, 513 Extended syntax (/$X+), 34, 41, 70, 93, 180 Extent, 346 External, 727 identifier, 709 External declarations, 709, 727 External directive, 715 ExtTextOut, 201 F Far key word, 727, 737 Far code model, 727 Far directive, 690 Far code memory model, 722 Fields inserting in transfer buffer, 609 File determining if in DIB format, 351-352 determining if open, 461 guarding against closing, 455 openings and closings in DLLs, 744 printing, 30 reopening, 30 saving changes before quitting, 461 File dialog, 597 displaying, 453 displaying file name lists, 501 File errors handling, 452 File Manager, 803 File menu, 30 creating, 454-455 implementing standard, 452 list of file names in, 35 File name selecting restricted set, 464 specifying new, 453 File name buffer address of, 454 File operation cancel command, 454 File dialog window, 453 File handling programs, 454 shell for, 462 File-Open and File-Save Dialogs, 452-465 Files selecting existing, 453 FillChar, 76, 610, 617 FillRect, 346 FindWindow, 756 FirstThat, 820-821 FIXED, 516 Fixed, 831 Floating menu, 270 creating in advance, 272 enabling accelerated, 293 Floating popup menu, 231 assigning accelerator keys to, 289-295 Focus, 123, 466-467 moving among controls, 445 shifting from control to control, 584 Font parameters that describe current, 662 standard proportionally spaced, 345 using new in a display context, 345 ForEach, 819-821 Forward, 714 Frame window, 804. See also MDI Free memory, 756 FreeLibrary, 687, 733, 735, 739, 743 FreeMem, 101, 354, 500, 687 FreeMultiSel, 609 FreeProcInstance, 692-693 fsPathName, 453 Function key word, 715, 732 Functions calling as procedures, 34, 70, 180 calling procedures, 827 G gcw_CbClsExtra, 478 gcw_CbWndExtra, 478 gcw_HbrBackground, 478 gcw_HCursor, 478 gcw_HIcon, 478 gcw_Style, 478 GDI (Graphics Device Interface), 163, 166, 168, 176-177, 649, 652, 667, 708 and bitmaps, 298 internal method used to display, 218 GDI colors, 626 GDI drawing, 194 GDI.EXE, 708 GetBkColor, 187 GetClassInfo, 478 GetClassLong, 478 GetClassName, 193, 199, 325, 328, 478, 818 GetClassWord, 478 declared, 478 GetClientRect, 176, 362, 412, 418, 704 GetClipboardData, 758, 769-770 GetCursorPos, 419 GetDC, 170, 175-176, 192, 303, 307, 409, 660, 678 GetDeviceCaps, 662, 673 GetDlgItem, 436, 503 declared, 435 GetKeyboardType, 82-83 GetKeyState, 596 GetMem, 9, 89, 101, 352, 500, 504, 686, 759, 832 GetMenu, 264 GetMenuCheckMarkDimensions, 330 GetMenuCount, 264 GetMenuState, 240, 242-243, 248, 265 declared, 242 GetMenuString, 264 GetMessage, 551-552 GetNearestColor, 186, 188 GetPhysPageSize, 654 GetPosition, 632, 641 GetPrivateProfileInt, 627, 629 bug with, 628 declared, 628 GetPrivateProfileString, 627, 655 declared, 628-629 GetProcAddress, 686-687, 726, 734-735 declared, 733 GetProfileInt, 627 declared, 628 GetProfileString, 627, 655, 662, 679, 686, 721, 731 declared, 628-629 GetStockObject, 345 declared, 181 GetStringLen, 590 GetSubMenu, 252, 258, 263-264, 294, 333, 666 declared, 251 GetSysColor, 345, 626 declared, 626 GetSysMetrics, 391 GetSystemMenu, 265, 270 declared, 265 GetSystemMetrics, 82-83, 360-362 GetText, 589, 596 GetTextExtent, 345-346 declared, 345 GetTextMetrics, 662 GetWindowClass, 193-194, 199, 325-326, 328, 375, 385, 400, 818 GetWindowsDirectory, 82-83 GetWinFlags, 82-84 Global data, 39, 513 calling program provides, 722 difficulties in multitasking environments, 721 Global event queue, 132 Global heap, 39, 99, 180, 513, 582, 832 compacting the entire, 353 enhanced mode, 353 standard mode, 353 Global memory, 353, 752 Global memory block, 744, 750, 752-753, 773. See also Memory block sharing, 748 Global variables, 832 GlobalAddAtom, 773-774 GlobalAlloc, 351, 750-751, 756, 773, 775, 777, 785 declared, 353 GlobalCompact declared, 353 GlobalDeleteAtom, 773-774, 776-777 GlobalFindAtom, 773-774 GlobalFree, 354, 751-752, 758, 773 GlobalGetAtomName, 773-775 GlobalLock, 351, 354, 751-752, 758, 775 declared, 351 GlobalSize, 353 GlobalUnlock, 351, 752, 758 declared, 351 gmem_DDEShare, 354, 775 gmem_Discardable, 353-354 gmem_Fixed, 354 gmem_Moveable, 353-354 gmem_NoCompact, 354 gmem_NoDiscard, 354 gmem_Zeroinit, 354 gmem_ZeroInit, 354 GotoXY, 69, 77 Graphic providing feedback, 402 Graphical elements representing your application's, 165 Graphical User Interface. See GUI Graphics adding to windows, 168 device independent, 9 displaying in minimized iconic window, 380 Graphics device interface. See GDI Graphics listings, 717 Graphics programming, 217 Grayed out, 253 GrayString, 201 gray_Brush, 182 Grep, 58 GREP.COM, 26 Group bit, 468-469 Group box, 468, 586, 616. See also TGroupBox designing with buttons and boxes, 587 entering text label, 468 Group controls, 469 Group window, 795 GUI (Graphical User Interface), 4-5, 7, 9, 11, 363, 466, 803, 837 H HAccTable, 282 Halt, 72, 160 Handle, 140 Hard copy. See Printing Hard drive scanning files on, 553 Hardware breakpoint command, 51 HBitmap, 300, 302, 320, 332-333 HBrush, 208, 320, 323-324, 346 HC.EXE, 12, 56 HCursor, 401, 420 HDC, 166, 175, 302, 650, 660 Header file, 230. See also C headers Heap, 832. See also Global heap, Local heap corrupted, 574 Heap fragmentation, 8 Heap memory reserving, 351 Heap... constants, 65 HeapError, 65 Help menu, 35-36 secret switch in, 36 Hewlett Packard LaserJet, 650, 678 HFont, 345 HIcon, 376 HilightMenuItem, 264 HIMEM.SYS, 24-25 HInstance, 65, 149, 712 HIWORD, 331, 346 HMenu, 248, 250-251, 255, 263-265, 271, 333, 339 hollow_Brush, 182, 402, 409 Horizontal separator line, 253 Hot key, 143, 252, 278. See also Accelerator Hot spot, 389, 392, 411, 573 and cursors, 388 over program's menu bar, 768 Hot key, 232 Hot key commands, 289 Hourglass, 389, 399, 413-414, 542 displaying, 413-414 during printing, 662 resetting to normal arrow, 663 HPen, 178-179 HPPCL.DRV, 650, 655 HPrevInst, 65, 160 hs_BDiagonal, 207 hs_Cross, 207 hs_DiagCross, 207 hs_FDiagonal, 207 hs_Horizontal, 207 hs_Vertical, 207 HWindow, 141, 170-172, 175 no longer valid, 178 HWnd, 140, 170, 436 HWnd (window handle), 160 initializing, 172 Hybrid programming language, 13 I I beam, 399 I/O error checking, 648 switching off automatic, 744 IBM PC extended characters, 438 Icon, 363, 439. See also Standard icons and mask, 365 built-in, 366-367 creating, 16 displaying, 364 displaying in group window, 373 displaying transparent, 365 disposing, 377 in a resource file, 364 loading built-in, 378 minimizing window to, 704 specifying in resource scripts, 378 storing on disk, 364 xor mask, 365 Icon bitmaps getting copies of, 377 Icon editor, 366, 371-372, 618 Icon file, 364 Icon formats, 365 Icon resource obtaining a handle to, 371 Icon's image composition of, 365 Iconicized window drawing inside, 379 idAbort, 143 idc_Arrow, 398 idCancel, 143 idc_Arrow, 399 idc_IBeam, 399 idc_UpArrow, 400 idc_Wait, 399 Identifier index, 709 idIgnore, 143 idi_Application, 378 idi_Asterisk, 378 idi_Exclamation, 378-379 idi_Hand, 378 idi_Question, 378 idNo, 143 idOk, 143 idRetry, 143 idYes, 143 id_Abort, 432 id_Cancel, 432 id_First, 136-137, 583 id_Ignore, 432 id_Internal, 137 id_No, 432 id_Ok, 432, 454, 464, 582-583, 611 id_Retry, 432 id_Yes, 432 Illegal heap operation, 574 Image blowing up, 307 copying to a window, 314 displaying bitmap, 347 drawing with extra speed, 312 Implementation, 715. 727 Import library, 708-710, 715-716, 725-726. See also DLL Import library unit, 729-731, 734, 738 bypassing the need for, 727 Improper tabbing conflict leading to, 469 Include files (.INC), 829 Index, 841 key word, 723 Individual strings identifying by sequential number, 514 Information prompting to enter, 445 Information sharing, 748 Inheritance, 15, 112-117 to construct dialogs, 429 Inherited method overriding, 113 InitApplication, 155-156, 159 InitChild, 822 InitInstance, 282, 288, 666 InitMainWindow, 128-129, 131-132, 139, 155-156, 160, 602, 806 InitResource, 578, 599, 607, 611, 617 alternate constructor, 602 InitWinCrt, 72, 756 Input, 65 limiting to specific values, 450 prompt for single-line, 446 Input box, 616 maximum length, 602 Input buffer, 449 Input control initially empty, 593 Input dialog, 445-452 displaying, 450 Input focus, 432 Insert, 87 InsertMenu, 251-254, 256, 264-265, 275, 339, 666. See also AppendMenu declared, 252 Installation writing automated, 795 Instance creating on the heap, 106 Integrated compiler, 825 Interface, 715, 718, 722 Interfaces experimenting with keyboard and mouse, 467 Interrupt service routine, 744 InvalidateRect, 201, 249, 329, 361, 641, 705 declared, 200 Invalidating windows, 201 IOResult, 84, 648, 744, 826 IsClipboardFormatAvailable, 756-757 IsDialogMessage, 549-550, 691 declared, 552 IsIconic, 380, 385 IsWindow, 794 Item getting index, 503 Items picking one or more, 466 K KERNEL.EXE, 708 Key combination programming multiple, 278 Keyboard and control objects, 584 Keyboard focus moving among groups of controls, 466 Keyboard messages directing to a window, 541 Keyboard support, 586 enabling for child controls, 634 opted to forego, 641 Keypress event, 550, 595 KeyPressed, 69 Keypresses responding to, 445 KillTimer, 177-178 L Labels displaying inside windows, 589 string tables, 514 Landscape mode printing in, 682 Language translate command to another, 667 Languages, 661 translating programs to foreign, 530 Large programs reducing complexity in, 116 Large project making routines available to, 529 Laser printers, 646, 652 Late binding, 119 lbn_DblClick, 591 lbn_ErrSpace, 591 lbn_KillFocus, 591 lbn_SelChange, 591-592 lbn_SetFocus, 591 lb_AddString, 490, 492, 498, 503 AddString vs., 603 lb_DeleteString, 433, 491, 499 lb_Err, 491, 499 lb_GetCurSel, 491, 499 lb_GetSelCount, 500 lb_GetSelItems, 500 lb_GetText, 491, 499-500 Length function, 87, 94, 205 Length byte string, 88, 94, 96, 205. See also String limitation in size, 88 Library discarding from memory, 733 key word, 711, 713 Library declaration, 723 Library header, 723 Line coloring, 187 drawing, 176 erasing old, 219 Line number information, 829 Line removal, 403 Line number information, 833 LineTo, 176, 185, 199, 409, 672 Link buffer file, 833 Linker options, 33, 833 Linking, 833 List initializing new, 490 largest possible string item, 492 retrieving selected item, 491 selecting more than one item, 499 List box deleting an entry from, 433 options, 490 sending strings, 490 strings, initializing, 591 List box control, 490, 499 finding index of selected item, 491 interactive, 492 selecting an item from, 498 List box control object creating, 591 List box's selector bar, 592 List control, 491, 501 creating dialogs to interact with, 492 List of items alphabetical, 490 processing selections made from, 591 List box message, 490 Listed items deleting, 491 Listings entering, 16 Lists, 499, 590. See also Multiple selection list interactive, 492-499 multiple-selection, 608 Lists for dialog boxes string tables, 514 Literal string constant, 92 LoadAccelerators, 282, 288, 311 called for new program instance, 666 LoadBitmap, 300, 302, 311, 323, 347 declared, 302, 346 LoadCursor, 398, 400 declared, 389-390 LoadIcon, 371, 377, 818 calling multiple times, 377 declared, 375-376 Loading option, 516 LoadLibrary, 679-680, 686, 733, 735-736, 738, 743 declared, 732 LoadMenu, 149, 154, 241, 263, 294, 311, 666, 768, 809 declared, 149-150 LOADONCALL, 516 LoadString, 518, 521, 634 declared, 517 Local heap, 513 allocating space, 560 specify number of bytes to reserve, 832 Local menu, 289 Lock count, 351 Locked memory referring to, 751 Locked memory block, 752 Logical bitmaps. See Bitmap Logical operators, 219 LongInt creating from two 16-bit values, 339 extracting Words from, 331 LOWORD, 331, 346 LParam, 191 LParamHi, 192, 199 LParamLo, 192, 199 ltGray_Brush, 182 M Macintosh, 5, 366 compatibility with Windows, 367 Main block, 129 Main window assigning to, window as dialog, 602 customizing program's, 134-135 TDlgWindow used as application's, 599 MainWindow, 132, 134, 139, 155-156, 809 Make, 58-59 Make file, 58 MakeBitmaps, 345 MakeIntResource declared, 399 MakeLong, 339, 776 MAKELONG, 452 MakePoint. See also TPoint MakeProcInstance, 691-693, 697 declared, 691 MakeWindow, 539-541, 548, 562, 567, 572, 689 MDI children, 817 Map file, 829, 833 Math coprocessor, 826 mb_AbortRetryIgnore, 142 mb_ApplModal, 142 mb_DefButton1, 142 mb_DefButton2, 142 mb_DefButton3, 142 mb_IconAsterisk, 142, 367 mb_IconExclamation, 142, 160, 367 mb_IconHand, 142, 367 mb_IconInformation, 142, 367 mb_IconQuestion, 142, 367 mb_IconStop, 142, 367 mb_Ok, 141-142 mb_OkCancel, 142 mb_RetryCancel, 142 mb_SystemModal, 142 mb_TaskModal, 142, 160 mb_YesNo, 142 mb_YesNoCancel, 142 MDI (Multiple Document Interface), 803 application's desktop, 816 application, smallest, 804 Bitmap viewer, 809-816 child window captions, 817 child window icon inside, 818 child window, operating, 819 client window, 805-806 creating a frame window, 806 displaying an icon inside, 816 frame window, 804-805, 816, 819 frame windows, 821 inserting child windows into, 817 menu, 809 messages, 822 minimum application, 807 opening document files, 817 redisplaying all windows, 819 searching for specific window, 820 typical application, 809 MDI tips, 822 Mem handle invalid, 351 Memory conserving, 829 helping Windows conserve, 707 loss of, gradual, 739 Memory bitmaps. See Bitmap Memory block, 351, 751, 775 copying data to, 752 discardable, 351, 353 in real mode, 8 locking, 751 newly allocated, 353 obtaining, 351 owned by the clipboard, 753 passing to the clipboard, 750 sharing global, 771 size of, 353 unable to allocate and lock, 756 unlocking before transferring, 775 Memory context, 377 Memory DC, 303-304, 306, 312-313, 318, 345, 354, 361, 377, 678, 705 Memory display context, 344, 673 Memory management, 8-9 Memory options, 516 MENCOLS.PAS, 239 Menu, 30-36. See also Dynamic menus adding bitmaps to, 339-340 and resources, 141-150 attaching to windows, 264 changes to, 250 changing at runtime, 258 command values defined in WObjects, 807 creating advanced, 263 creating at runtime, 255, 263 creating the easiest way, 141 creating with string resources, 523 dynamic, 249-265 English and Danish, 530 inserting new commands, 252 keeping as simple as possible, 249 obtaining a handle to, 251 onscreen appearance out of synch, 255 referring to individual, 250 translating to another language, 44 undoing modifications, 254 updating the display, 254 using AppendMenu to create from scratch, 275 Menu bitmaps, 344 Menu checkmarks customizing, 329-338 Menu command benefits of grayed out, 257 checkmark symbol, 240 creating accelerators related to, 281 deleting, 254-255 displaying a checkmark next to, 241 displaying correctly, 462 end with three-dot ellipsis, 430 graying by position, 258 in columnar tables, 238 referring to specific, 250 Menu command messages intercepting from Windows, 152 Menu editor, 438, 447, 454, 807 Menu handle, 250 Menu item bitmapped, 338 changing the character of, 264 checked and unchecked, 333 determining attributes, 243 displaying with different font, 338 grayed, 263 grayed vs. disabled, 257 graying, 256-258 inserting by position, 253 main-level, 144 number of, 264 reenabling, 258 top-level, 147 Menu item string returning, 264 Menu name, 252 as a command, 238 top-level, 229 Menu resource, 250 bound into StdWnds, 666 creating, 143 identifying, 154 identifying by a string or small positive integer, 229 individual commands in, 151 loading, 154 loading and assigning, 149 loading at runtime, 233 Menu resource editor, 143 Menu resource handle, 150 Menu resource identifier, 150 Menu status giving visual feedback about, 259 mergeCopy, 305 mergePaint, 305 Message matching in queue, 551 sending to a control, 434 Message box, 136-137, 366 displaying icons in, 367 with icons, 367 Message categories, 121 Message consolidation, 410 Message constants, 433 Message processing resuming normal, 401 Message queue, 10, 133 investigating, 551 Message response method, 135-136, 140, 151, 154, 172, 178, 188, 340, 602, 606 and subclassing, 480 and TDialog, 428 and the system menu, 267 calling directly, 640 common, 430 declared, 189 for displaying About Box dialog, 444 OWL's mechanism for processing, 289 processing specific notification method, 605 Message-handling techniques, 123 MessageBeep, 140, 451, 480, 605 for debugging, 140 MessageBox, 141, 154, 160, 270, 294, 361, 366-367, 371, 451, 521, 662 calling frequently, 370 calling when Windows shutting down, 741 declared, 140-141 Messages, 10, 16, 132, 135, 837 and control object methods, 602 DDE as a set of, 771 dealing with, 550-552 finding, 551 generating for double clicks, 192 locating an application's, 550 passing information with, 435 sending from DLLs to application, 744 sending to controls, 435 Metafile, 667 Metafile picture, 749 Methods, 102 mf_Bitmap, 252-253, 339 mf_ByCommand, 241-243, 248, 255, 257, 264, 333 mf_ByPosition, 241-242, 252, 254-255, 257-258, 264, 333 mf_Checked, 241-244, 248, 253 mf_Disabled, 243, 252-253, 257-258 mf_Enabled, 243, 253, 257-258 mf_Grayed, 243, 252-253, 257-258 mf_MenuBar, 252 mf_MenuBarBreak, 243, 252-253 mf_MenuBreak, 243, 253 mf_OwnerDraw, 252-253 mf_Popup, 253, 256 mf_Separator, 243, 253 mf_String, 253 mf_Unchecked, 241-244, 248, 253 Microsoft C (MSC), 12 Microsoft Corporation, 3 Microsoft Resource Compiler. See RC Microsoft Windows Software Development Kit. See SDK Microsoft Word for Windows, 240, 279 Microsoft Resource Compiler, 284 MIDI, 804 Minimize symbol. See Blank icon Minimized application sending wm_Paint messages to, 379 Modal dialog, 427-428, 431, 537, 539, 578 and use of transfer mechanism, 611 as resources, 538 bringing up, standard method, 447 transferring data to and from, 611 Mode selection general philosophy towards, 403 Modeless abort dialog, 646. See also Abort dialog Modeless dialog, 428, 537-550, 552, 561, 566, 663, 689-690 appearing immediately, 541 as resources, 538 closing, 542 creating, 539 destroying, 542 disposing, 541 example, 538 managing, 549 similar to child or popup window, 562 style attributes, 538 typical, 539 Modeless dialog message, 549 Modeless directory, 553 Modeless status dialog, 542-543, 548, 561 Modified file warning, 465 ModifyMenu, 264-265, 339 declared, 264 Monochrome screens, 365 Mouse capturing, 191-192 detecting inside rectangle, 411, 641 determining if present, 83, 391 drawing with, 194-201 Mouse button, 188 Mouse button messages, 573 Mouse clicks responding to, 136-141, 192 sensing, 641 Mouse clicks and movements responding to, 199 Mouse coordinates, 409 Mouse cursor hot spot location, 275 Mouse input capturing, 391 capturing all future, 198 Mouse location casting to a TPoint record, 412 Mouse message processing returning to normal, 391, 401 Mouse message response methods, 194 Mouse messages, 188-189 capturing, 400 intercepting, 188 Mouse movements complete control over, 191 consolidated information for fast, 200 recognizing, 189 Mouse operation, 401 Mouse pointer, 390, 400, 402 display count, 360 hiding, 360 synonym for cursor, 387 turning off, 355 Mouse pointer location, 188, 190, 200 Mouse button click locating cursor following, 419 Mouse capture methods, 408 MOUSE.COM, 26-27 Move, 752 MOVEABLE, 516 Moveable, 831 MoveTo, 176-177, 185, 192, 409, 672 Msg, 192 Multilevel menus, 231, 237 designing, 232-234 using, 234 Multiline Edit, 481 Multiline edit control, 480-481, 482, 593 creating new, 594 shifting focus from, 596 Multiple applications sharing allocated memory by, 354 Multiple dialog instances, 429 Multiple document interface, 803-823. See also MDI Multiple Instances preventing, 159-160 Multiple units startup code in, 738 Multiple selection lists, 499-500 Multitasking, 6, 8-9, 171, 212 Multitasking environments difficulties with shared global data, 721 Multitasking operating system, 747 N Name key word, 724 Name option, 728 Nested menus. See Multilevel menus Nested multilevel menu, 253 Network printer sharing, 656 New, 9, 132, 832 NewFrame, 653-654, 662 Next, 596 NextBand, 654 NextToken, 697 nf_First, 137, 606 nf_Internal, 137 No button, 463 Nonpreemptive scheduling, 10 Nonvirtual key serving as an accelerator, 280 Normal child window type, 564 Normal child window, 563 NotePad, 643 Notification messages, 573, 583, 586, 592, 603, 605-606 generated for list box, 591 intercepting from TListBox control, 590 notSrcCopy, 305 notSrcErase, 305 NULL, 71 Null string, 95. See also ASCIIZ string Null terminator byte, 101 Null-terminated string, 74, 88, 252, 827 and lists, 490 Null-terminated string assignment, 71. See also String null_Brush, 182 null_Pen, 182 O Object and methods, 105 constructing and destroying, 117 creating new, 110, 117 creating via New on the heap, 109 data fields, 102 defined as variables, 104 defining an instance, 129 hiding information inside, 116 key word, 113 methods, declared inside, 102 storing in separate units, 546 Object data fields making direct assignments to, 105 Object hierarchy, 835 Object instance, 104, 106, 108 address of, 107 addressing with pointers, 106-107 Object Oriented Programming. See OOP Object type declaration, 102 Object Vision, 14 Object Windows Library. See OWL Object-code file (.OBJ), 829, 831 Object-oriented techniques responding to control events, 599 OEM (Original Equipment Manufacturer, 83 OEM character set, 749 oem_Fixed_Font, 182 Offline printer detecting, 648 Ok button, 427-428, 432, 446, 449, 454, 479, 482, 489, 499, 504, 579, 581, 590, 611 wide, 582 Ok button control, 583 Ok method, 428, 499 Ongoing process displaying updates, 542 Online help, 35 OOP (Object Oriented Programming), 4, 13, 118 fundamentals, 101-120 inheritance, 113 learning about, 16 mix with non-OOP code, 318 OpenClipboard, 489, 749-750, 752, 757 Operating mode confirming, 40 Operating system single-tasking, 10 Options. See also Compiler options, Linker options list, 41 Options menu, 33-34 Original Equipment Manufacturer. See OEM OS/2, 5-6, 10 OS/2 Presentation Manager, 7, 11 Out-of-memory error, 689 handling, 540 Outport port. See also Environment Outport ports examples, 650 Output, 65 Output directory path name, 34 Output port, 655 Output port name, 680 OWL (Object Windows Library), 3, 14-16, 57, 64, 101, 106, 118, 122, 835 and MDI applications, 803 control objects, 578 key features, 15 transfer mechanism, 607 OWL applications ending correctly, 154 OWL program, 129 smallest possible, 128 P Packed key word, 87 Page ejects current, 653 Paint method, 164-166, 168, 185, 211, 217 overriding, 166 Paintbrush, 762 PaintDC, 176, 185 PApplication, 130. See also TApplication Parallel port sending output to, 653 ParamCount, 65 ParamStr, 65 PARC (Xerox Palo Alto Research Center), 4, 13 Parent window, 140 address of, 431 keeping track of children, 584 Parent window's address, 611 ParentNotify method, 573 Parsing strings, 660-661 PASCAL key word, 729 Pascal learning, 66 Pascal calling convention, 729 Password edit control, 480-481, 484, 489 discovering text entered into, 483 Password styles, 481 Paste command, 747, 761-762, 768 Paste Link command, 794 PatBlt, 313-314 declared, 313 patCopy, 305 Path resetting, 26 PatInvert, 305 Pattern hatched, 206 PChar, 74-75, 90-93, 95, 129, 150 and MakeIntResource, 399 passing string constants to, 311 PChar constant address values, 94 PChar pointer, 94, 96, 98, 99, 112, 132, 141, 156, 325, 339, 367, 447, 623 creating array to address string, 522 typed constant array of, 502 PeekMessage, 417-418, 549-552 declared, 550-551 use, 551 Pen, 176 creating, 180 drawing with, 181-186 predefined, 181 selecting, 188 Pen color selecting, 179 Pen styles, 178-186 Performance losses, 180 Permanent, 831 Pick lists, 490 Picture element. See Pixel PInputDialog, 446. See also TInputDialog Pixel (picture element), 140, 164 inverting, 403 width, 179 Plotters, 652, 667, 673, 678 PM (Presentation Manager), 5. See also OS/2 Presentation Manager PMDIClient, 807 PMDIWindow, 806. See also TMDIWindow PMultiSelRec, 608-609. See also TMultiSelRec pm_NoRemove, 418, 551 pm_NoYield, 418, 551 pm_Remove, 418, 551 Pointer dereferencing, 91, 107 disposed, 100 in Pascal, 89 using to address objects, 118 Pointers to objects, 574 Polygon, 649 Popup menu, 253, 333, 339, 666, 805, 807 number of subcommands in, 242 Popup menu handle, 250 Popup menus, 229 removing from a main menu, 256 selecting commands from, 277 Popup window, 573 closing, detecting, 575 creating, without a parent, 566 Popup window with a parent, 563 creating, 574 Popup window without a parent, 563 Popup windows, 538, 574. See Child and popup windows Pos, 87 Position scroll bar, 641 scroll bar, forcing, 640 Positions current scroll bar, 705 PostAppMessage, 551 PostMessage, 744, 777-778, 785-786 PostQuitMessage, 155 posWindowMenu, 816 Predefined cursor identifiers, 389 Preemptive scheduling, 10 PRELOAD, 516 Preload, 831 Presentation Manager. See PM Previous, 596 Primary file, 33 Print text, commands required, 652 Print command adding to File menu, 666 Print job beginning new, 662 cancelling the current, 689 ending current, 660, 663 Escape to begin new, 653 interrupting, 687 queue, 656 Print jobs unit for canceling, 693 Print Manager, 651, 653, 656, 667, 690-691 out-of-disk error fix, 692 Printer control codes, sending, 647 determining if can print bitmaps, 673 Printer device context, 649-650, 656, 662-663, 672-673, 678, 705 Printer device driver, 649, 650, 654 Printer errors, 646 Printer features selecting, 678, 681 selecting custom, 660 Printer file variable, 647 Printer performance improving, 667 Printer settings default, 680 Printer setup dialog, 678-679, 681, 686-687 example, 682 Printer's device context, 652, 673, 690, 692 Printer's device context handle, 653 Printers determining type attached to computer, 654 that do not support bitmap images, 673 Printing, 645, 652 bitmap, 673-674 cancelling in progress, 646 commands, 651 determining whether interrupted, 689 global values required during, 662 graphics, 667-673 in Windows, 85 interrupting, 689, 692 interrupting in progress, 663 preventing other applications from becoming active, 705 running applications during, 688 speeding, 656 text, 645-647, 662, 697 Printing area determining horizontal and vertical size, 662 Printing devices differences, 646 Printing errors, 663 Printing settings parsing, 654-656 Printing text and graphics calling GDI to, 650 Printing text files, 85 Private declaration, 120 Private identifier, 120 Private profile, 627. See also Profile Private section inserting data fields in, 121 PRN, 647 Procedure key word, 715, 732 Procedure and function variables, 734 Procedure instance address. See Thunk Process executing long, 551 Processor time share of, 417 Profile, 627 storing items, 628 Profile settings bracketed divider, 629 storing in SYSCOLOR.INI, 631 Profile string, 662, 655, 731 Program compiling, 34 compiling and linking, 33 debugging with TDW, 41, 55 exiting immediately, 160 initializing multiple copies of, 666 key word, 711 memory efficiency, improving, 514 preventing from halting, 86 preventing premature ending, 452 previous instance, 160 running in background, 417 starting multiple copies of, 155 translating to foreign language, 530 using multiple DLLs with, 726 Program Index, 839 Program instance, 740 multiple, 155 Program Manager, 23, 28, 363, 371, 563, 643, 803 establishing a DDE conversation, 795 icon in program .EXE file, 372 Program Manager group window, 373 Program module importing DLL routines into, 727 Program segment prefix (PSP) in DLLs, 744 Program output saving in disk files, 655 Programming with DDE, 771 Projects multimodule, 33 rebuilding an entire, 33 Prompt boxes attitude in, 463 Protect mode, 6, 51 Prototypes, 729 for DLL routine, 726 PSP. See Program segment prefix PStatic, 623 PStrCollection, 607 ps_Dash, 179 ps_DashDot, 179 ps_DashDotDash, 179 ps_Dot, 179 ps_InsideFrame, 179 ps_Null, 179 ps_Solid, 179 PtInRect, 412, 641 declared, 411 Public declaration, 120 Public symbols, 829, 833 Pulldown menu, 133 responding to commands, 152 Pulldown menus, 141, 144, 151, 169, 229, 231 Pushbutton, 579. See also Default pushbutton PWindow. See also TWindow, 132, 155 PWindowsObject, 429, 572 recasting to descendant's type, 821 Q Qualifiers, 724 QueryEscSupport, 654 R r2_Black, 218, 409 r2_CopyPen, 218 r2_MaskNotPen, 218 r2_MaskPen, 218 r2_MaskPenNot, 218 r2_MergeNotPen, 218 r2_MergePen, 218 r2_MergePenNot, 218 r2_Nop, 218 r2_Not, 218, 403, 409 r2_NotCopyPen, 218 r2_NotMaskPen, 218 r2_NotMergePen, 218 r2_NotXorPen, 218 r2_White, 218 r2_XorPen, 218-219 Radio button, 466-480, 616-617 initializing, 470 responding to selections, 587 retrieving, 470 retrieving values, 479 setting tabstop for selected, 477 storing in 16-bit Pascal sets, 470 style, obtaining current, 478 tabbing to group, 477 Radio button group tabbing to, 469 Radio button resource creating, 472 RAM conserving, 223 dealing with shortage of, 540 freeing for other uses, 233 shortage of, 255 RAM drive, 24-26 RAM requirements reducing program's total, 732 RAMDRIVE.SYS, 24-25 Random, 177, 187 Range selector, 136, 583, 606 hexadecimal values, 136-137 Raster devices requesting information about, 673 Raster operation. See ROP Raster operation codes, 313 Raster printers, 667. See also Printing RasterCaps, 673 RC (Microsoft Resource Compiler), 145, 227, 832 RC.EXE, 12, 43, 56, 145, 227 rc_BitBlt, 673 Read, 65, 73 ReadBuf, 73, 75 declared, 76 ReadKey, 73, 76 Readln, 65, 73, 75, 86 README.TXT, 16 Real mode, 8, 25, 38, 40, 212, 351, 827 Rectangle, 168, 170, 313, 402, 409, 672 basic steps required to paint, 207 creating shadowed effect, 211 displaying, 168 drawing or printing, 645 Rectangle coordinates, 176 Recursive procedure, 560 Registers inspecting, 52 Regular expressions, 31, 59 ReleaseCapture, 191-192, 199, 391, 401, 409 ReleaseDC, 170, 192 RemoveMenu, 256 Requirements hardware and software, 21-22 Reset, 84, 86, 352 Resident key word, 725 Resident option, 728 Resource, 143 attaching to applications, 146 copying to another .RES file, 225 creating at runtime, 228 creating directly, 227 defined, 223 designing your program's, 44 four ways to create, 225 larger than 64K, 146, 832 loading when already in memory, 294 preloading, 149 preloading critical, 233 programming with, 224 saving as scripts, 226 storing in multiple files, 146 storing in separate .RES files, 225 Resource Attributes, 144, 300, 372, 431 Resource attributes and accelerator table, 281 Resource Attributes command, 233 Resource Attributes dialog, 238-239 Resource directive {$R}, 146, 225 Resource file (.RES), 225, 829, 832 and icons, 364 editing small, 46 maintaining separate, 225 Resource ID constants, 147 Resource name as pseudo-32-bit pointer, 400 Resource script, 12, 226 and bitmaps, 300 creating new from scratch, 145 specifying icons in, 378 Resource types, 43 Result, 191 ResultHi, 191 Rewrite, 84, 86, 647 RGB, 179-180, 186-187, 206, 641 RLE (run length encoding), 299 ROM BIOS, 10 ROP, 306 ROP (raster operation), 218 Routine searching a DLL for specific, 708 Rubberband line, 623, 641 Rubberband operation preventing serious errors, 412 Rubberbanding, 402-403, 410 implementing, 409 Run menu, 32 Run length encoding. See RLE Runtime error, 32, 86, 828-829 preventing in DLLs, 744 Runtime library, 33, 63 S Sample programs running, 28 running from Pascal tutorial, 66 trouble compiling and running, 30 Save command when to enable, 465 Save As... command enabling, 465 Scan codes translating to virtual key codes, 278 Screen coordinates, 271 Screen element obtaining color value for, 626 ScreenSize, 69-70 Scroll bar creating custom, 631 range of, low and high, 609 Scroll bar control, 69, 77, 481, 593, 596, 598, 641-642, 698, 818. See also SetRange custom, 623 enabling, 703 essential task needed by, 632 positioning, 598 ranges, maximum, 703 vertical, 70, 594 Scroll bar control object. See also TScrollBar Scroll bar controls, 640 Scroller, 818. See also TScroller Scrolling limiting to size of information, 704 ScrollTo, 77, 704 sc_Close, 267 sc_Maximize, 267 sc_Minimize, 267 SDK (Microsoft Windows Software Development Kit), 12, 14, 43, 47, 55, 399, 428, 837 SDK MAKEPOINT macro, 413 sd_FileOpen, 453 sd_FileSave, 453, 465 Search menu, 31-32 Seek, 352 Segment address, 829 Segment information, 833 Segment register DS, 744 Segment register SS, 744 Segment registers, 712 Selected file name buffer for, 453 Selected item allocating memory for holding, 504 retrieving index values of, 500 returning the number of, 500 Selection deleting current, 499 making quick, 466 SelectObject, 179-180, 185, 207, 311, 313, 318, 402 and bitmaps, 303 and brushes, 324 Self, 107-108 common use for in OWL, 108 key word, 431 SendDlgItemMessage, 435-437, 477, 479, 481, 498-500, 511, 583, 603 adding new strings to list, 491 alternative to, 503 declared, 434 passing address of array to, 482 passing string addresses, 503 SendDlgItemMsg, 451-452, 498, 549, 583 declared, 436 TDialog function, 436 SendMessage, 437, 478, 503, 776-777, 785, 793 declared, 436 Serial communications interface, 744 Server, 772, 775, 778-779, 785, 795 asking for information, 777 minimum message types, 785 starting a conversation with, 776 SetAbortProc, 654, 689, 691-692 SetBkColor, 345 SetCapture, 191-192, 198, 391, 401 SetClassWord, 329 SetClipboardData, 752-753 declared, 752 SetCursor, 391, 401, 413-414, 417, 662-663 declared, 390 SetCursorPos, 419-420 SetFocus, 541, 572, 688, 705, 821 SetMenu, 264 SetMenuItemBitmaps, 333-334 declared, 333 SetPosition, 640 SetRange, 632, 704 SetROP2, 218-219, 403 declared, 218 SetSysColors, 627 declared, 627 SetText, 589 SetTextColor, 206, 345, 626 SetTimer, 172, 178 SetupWindow, 171-172, 318, 360, 479, 490-491, 579, 586, 632 initializing dialog controls, 498 loading the strings, 634 opposite, 178 preparing initial control values, 430 SetWindowText, 423, 464-465, 565, 592 declared, 464 Shift key determining if down, 596 Short Circuit Boolean (/$B-), 41 Shortcut keys, 277 Show, 541, 820 ShowCursor, 360-362 declared, 360 Shutdown chain linking exit procedure into, 738 Sibling relationship, 623 Simple box, 501 Single stepping, 52 Single line edit controls, 592 sizeIconic, 704 Smalltalk, 4, 13, 710 SMARTDRV.SYS, 24 sm_CXScreen, 360 sm_CYScreen, 360 Sociable programs, 747 Solid brush. See also Brush, 325 Source code directives, 41 Speaker beep, 605 Special effects, 326, 365 Spooler. See Print Manager Spooling, 667 Sprites, 366 sp_AppAbort, 651 sp_Error, 651 sp_NotReported, 651, 654 sp_OutOfDisk, 651, 690 sp_OutOfMemory, 651 sp_UserAbort, 651 srcAnd, 305 srcCopy, 305-306, 311 srcErase, 305 srcInvert, 305 srcPaint, 305 Stack, 513, 744 Stack checking disabling for DLL exit procedure, 742 turning off, 737 Stack overflow error, 116 Stack segment DLL use of, 711 Stack space increasing allocated, 560 specify number of bytes to reserve, 832 Stack overflow instructions, 737 Standard control hooking custom code into, 437 Standard dialogs, 445 Standard icons, 366 Standard mode, 8, 22, 25, 351, 827 Standard output, 647 Standard Pascal, 86 StartDoc, 653-654, 662, 689, 692, 697 Startup code in DLL's main block, 714 Static control's text changing, 589 Static controls, 425 Static importing, 726-731. See also DLL Static method, 119 Static text control, 490 Static text label, 481 Status dialog, 560 designing, 542 using, 553-562 Status line, 36 Status unit, 547, 553 Status unit's modeless dialog, 543 StdDlgs (standard dialogs) unit, 445, 446, 452-453 binary resources required, 446 STDDLGS.PAS, 445, 451 STDDLGS.RES, 446, 452 StdWnds, 663, 667 STDWNDS.PAS, 596 Stock cursor, 400 loading, 398 Stock objects, 181 Stock resources names of, 399 StrCat, 97 StrComp, 98 StrCopy, 71, 95-96 StrDispose, 99-101, 112, 115-116, 523, 634, 661, 720 StrECopy, 96 StrEnd, 95 StretchBlt, 301, 306-307, 311-312, 314, 318-319, 347, 362, 378, 673 declared, 306 StrFill, 720, 722 StrIComp, 98 String, 71, 74, 88, 99, 205, 720 embedding a carriage return, 515 inserting embedded control codes, 515 loading in groups of 16, 514 octal codes, 515-516 parsing, 720 storing lists of in memory, 607 storing space for holding, 518 String constants, 202 String copies disposing, 523 String data type, 86, 88 String editor, 515 String expressions, 92 String key word, 87 String table combining multiple into single, 514 common use, 517 created as a script, 516 creating, 515 default settings, 516 maximum length of each string, 514 units and multiple, 523 String table resource, 514, 529, 623, 667 addressing, 522 error string in, 521 loading text from, 634 String variables, 202 String components use NextToken to return pointers, 661 Strings unit, 94, 101 StrLCat, 97 StrLComp, 98 StrLCopy, 96 StrLen, 94-95, 100, 205, 759 StrLIComp, 98 StrNCopy, 720 StrNew, 99-101, 115-116, 634, 661 StrPas, 98-99 StrPCopy, 96-97, 205 StrTok, 720 strtok, 660 StrTok, 721 Stub, 40 Style bits, 565 Styles disabling, 194 enabling and combining, 194 Subclassing, 13, 15, 437, 480, 590, 603 avoiding need for, 437 Subroutines exporting, 723 SVGA (super VGA), 47 Swap file setting up permanent, 23 SWAPFILE.EXE, 23 sw_Hide, 540 sw_Show, 540 sw_ShowMaximized, 540 sw_ShowMinimized, 540 sw_ShowNormal, 540, 820 Symbolic Link (SYLK), 749 Symbols reducing number stored in memory, 726 SysColor using, 641-643 SYSCOLOR.INI, 641-643 sample of, 629 SYSEDIT.EXE (System Configuration editor), 45 System, 58, 65, 85, 149, 160, 712, 737-739, 741 System color, 640 changing, 642 System commands intercepting, 267 System menu, 130, 169, 177, 266 adding, 574 commands in, 266 customizing, 265 getting a handle to, 265 removing a command, 270 System menu commands accelerator keys associated with, 283 System menu's icon double clicking, 567 system_Fixed_Font, 182 system_Font, 182 T Tab control code, 281 TabbedTextOut, 201 Tabbing among button groups, 466 Tabbing order, 468 shifting, 469 Table Brush Patterns, 207 CheckMenuItem Check Options, 241 Child window styles, 564 Clipboard's data formats, 749 Escape error codes, 651 ExtDeviceMode values for the Mode parameter, 681 Flag constant for the GlobalAlloc, 354 Flag Values for AppendMenu and InsertMenu, 253 GetMenuState Return Values, 243 Icon formats, 364 Message Range Selectors, 137 MessageBox Return Values, 143 Mouse Messages, 189 PenStyle Constants, 179 Raster operation codes for Bitblt, 305 SetROP2 DrawMode Values, 218 Stock Object Constants for GetStockObject, 182 TextType Option Values for MessageBox, 142 TWindowsObject.Show parameters, 540 Values to pass to GetClassWord, 478 Window Styles, 195 Tag Image File Format (TIFF), 749 TApplication, 128-130, 132, 139, 155-156, 158-159, 170, 282, 431, 623, 628, 835 TApplication instance, 129 Tasks giving a chance to run, 417 time, giving, 551 TAtom, 772-774 TBufStream, 835 TButton, 433, 582, 602-603, 835 participation in transfers, 607 TButton controls, 585 TButton object, 579 TCheckBox, 433, 835 descendant of, 588 represented by Word values, 607 values as Words, 607 TCheckBox object, 584-586 TCollection, 123, 607, 835 TColorRef, 179, 186, 623, 626-627, 629, 641 TColorScrollBar, 631 TComboBox, 578, 835 descendant of TListBox, 597 values in a record, 607 TComboBox object, 597 TComboTransferRec, 607 TControl, 433, 437, 566, 578, 602-603, 607, 835 client window, 806 TDCONFIG.TDW, 48 TDeviceMode, 686-687 TDevMode, 650, 680, 682, 686-687 TDialog, 15, 428-430, 454, 542, 561, 578, 599, 603, 688, 835 using TDlgWindow in place of, 562 TDialog descendant objects TPW implementation, 446 TDialog instance addressing on global heap, 444 declared as local variable, 441 disposing of, 445 TDlgWindow, 599, 602-603, 688, 835 initializing controls, 599 modeless dialogs, 561 using as main window, 602 TDMIWindow, 819 TDosStream, 835 TDstrip, 59 TDump, 60, 227 TDUMP, 710 TDW (Turbo Debugger for Windows), 8, 32, 41, 46-48, 51-53, 159, 169, 270 command-line options, 49 commands not supported, 50 configuring for dual monitors, 48 windows messages, 51 TDW.EXE, 48-49 TDWinst installation utility, 48 Tear off menus, 270. See Floating popup menus TEdit, 596, 602, 609, 667, 835 as array of Char, 608 default style, multiline edit control, 594 TEdit control, 593, 595 TEdit object, 592, 596 TEditWindow, 596, 663, 667 TEMC.EXE, 56 TEmsStream, 836 Text, 86, 647 clipboard, checking for, 757 clipboard, copying to, 750 clipped to boundaries, 589 displaying in windows, 201 drawing on printed page, 662 extracting from a control, 596 extracting from clipboard, 759 multiline, 481 print, commands required, 652 scroll horizontally, 594 Text and graphics printing, 649 Text colors changing, 205-206 Text file loading, 663 TExtDeviceMode, 686. See also ExtDeviceMode declared, 680 TextOut, 201, 204-205, 211, 346, 662 and printing, 653 combining text and graphics, 673 declared, 201-202 using to display text, 202 TFarProc, 686, 692, 733 TFileDialog, 452-453 creating an instance of, 454 returning a value, 454 TFileWindow, 596, 663, 666-667 adding printer output to, 664 tf_GetData, 611-612 tf_SetData, 611-612 TGroupBox, 587, 836 participation in transfers, 608 TGroupBox object, 586 pointer to, 588 THandle, 149, 353, 686 Thumb position, 640 Thumb selector, 609 position of scroll bar, 632 Thunk, 691 address of abort procedure's, 692 disposing of, 692 TIFF. See Tag Image File Format TileChildren, 822 Timer, 172, 384-385 and double clicking, 192 killing, 177 limitations, 171 number of, 171 setting, 171-178, 175 Timer function, 170 TInputDialog, 446, 449-451, 454, 464, 480 TListBox, 836 complex data type format, 608 TListBox object, 590 TListBoxTransferRec, 608 TMDIClient, 806, 816, 822, 836 TMDIWindow, 806-807, 809, 816-817, 819-822, 836 TMessage, 135, 199, 233, 289, 480 declared, 189-191 preparing various fields, 641 using with WObjects methods, 418 TMessage parameters, 190 TMsg record, 417 TMultiEd, 595 TMultiListBoxTransferRec, 608 TMultiSelRec, 608-609 TObject, 128, 836 Toolbook, 14 Top-level menu as a command, 234 caution about modifying, 265 reducing the number of, 270 Top-level menu name highlighting and unhighlighting, 264 Touch, 58-59 TPaintStruct, 166 TPCW.CFG, 42, 830 TPCW.EXE, 37, 42 running, 39 TPoint, 69, 275, 413, 641. See also MakePoint TPUMOVER.EXE, 57-58 TPW (Turbo Pascal for Windows), 3, 8-9, 11, 14 examining resources, 44 file-handling capabilities, 84 import library, 708 OOP extensions, 13, 101 problems starting, 30 runtime library, 57, 63-64 utilities, 12 TPW units, 64 TPW utilities trouble running, 27 TPW.CFG, 29, 42 TPW.DSK, 29-30 TPW.INI, 29, 48 TPW.TPL, 57, 63-64, 830 transferring original, 59 TrackCursor, 77 TrackPopupMenu, 272, 275-276, 294 declared, 271 TRadioButton, 588, 836 values as Words, 608 TRadioButton object, 586 Transfer declared, 611 Transfer buffer, 429, 607, 612 address of, 617 copying data from to controls, 611 Data record, defining, 611 using, 612 Transfer buffer record, 609 Transfer mechanism, 578, 588, 607-617 enabling, 611 modal dialogs that use, 611 TransferData, 611 TranslateAccelerator, 283 TranslateMessage, 417, 550, 690 declared, 552 TRect, 175, 329, 362, 623, 641, 704 declared, 176 TScrollBar, 703, 836 values as a record, 608 TScrollBar object, 598 TScrollBarTransferRec, 609 TScroller, 703-705, 818, 836 TSortedCollection, 123, 836 TSRs, 7, 27, 51 TStatic, 596, 631-632, 792, 836 adding input capabilities, 592 format of stored text, 609 TStatic object, 589, 593 TStrCollection, 836 TStream, 836 TStringCollection, 836 TTextMetric, 662 Turbo Debugger for Windows. See TDW Turbo Debugger utilities, 59-60 Turbo Pascal. See DOS Turbo Pascal Turbo Pascal for Windows. See TPW Turbo Vision, 546. See TV Turn-key application, 38 TV (Turbo Vision), 122 TWindow, 15, 112, 132, 134, 139, 149, 151, 154, 156, 170, 172, 428, 542, 572, 589, 603, 610, 623, 703, 836 creating a new object decendant, 135 implementing timers in, 171 overriding standard Paint method, 168 TWindow descendant menu commands, 151 TWindow Init constructor declared, 132 TWindow instance application's main, 430 TWindow method calling MessageBox in, 141 TWindow.Paint declared, 165-166 TWindowAttr, 140 declared, 565-566 TWindowsObject, 132, 154, 170, 193, 267, 428, 540, 542, 572, 589, 595-596, 602-603, 605, 611, 792, 836 TWndClass, 326, 478 Typecast, 93 and PChar, 93 Typed-constant pointer, 721 U UCSD Pascal, 87 Uncheck, 586 Undo multilevel capability, 516 Unit adding entry and exit code to, 739 compiled separately, 831 compiling, 33 conflicting identifiers, 724 creating resources for stand-alone, 546 DLL, 715 isolating main objects in, 529 key word, 711 linking to program module, 829 modularizing a DLL, 718 multiple, 529 multiunit project, 723 reason to modularize DLL, 718 Unit startup code, 738 Unpak, 59 using to reinstall files, 59 Unrecoverable Application Error, 574 Untyped file variable, 351 Untyped handle, 353 untyped pointer, 650 UpdateWindow, 201 Use counter DLL's, 709 USER.EXE, 708 Uses declaration, 660, 708, 712, 715, 717, 723, 838 Uses directive, 738 V Variables declaring, 9 inspecting values of, 52 storing large, 99 VGA, 24, 44 output speed, 48 Video mode extended, 49 Virtual CRT, 301 Virtual index, 135, 136, 152, 166, 175, 248, 252, 288, 440 Virtual index expression, 136, 606 no time penalty for using, 135 Virtual key, 278, 280, 284, 288, 595, 596 Virtual key event translated to wm_Char message, 552 Virtual key message, 550 Virtual key word, 119 Virtual memory, 8, 22-23, 513 Virtual method, 15, 117-120 and subclassing, 437 Virtual method indexes, 15 Visual BASIC, 14 vk_Shift, 596 W WaitMessage, 552 WEP, 737 wep_Free_DLL, 739 wep_System_Exit, 739 WhereX, 77 WhereY, 77 whiteness, 305 Whitewater Resource Toolkit. See WRT white_Brush, 182 white_Pen, 182 Widget, 546 Wild card string, 464 WIN.INI, 36, 45, 627, 656, 662, 680, 682, 686, 720-721 device profile string in, 655 parsing strings in, 660 RUN command, modifying, 643 WinCrt, 57, 65-66, 73, 76, 85, 111, 116, 130, 331, 731, 743, 753, 838 adjusting program's window size, 70 calling routines in Windows.API, 77 extracting from TPW.TPL, 57 good use for, 330 largest buffer size, 70 output window, 75 width and height of output window, 69 WinCrt output window obtaining handle, 756 title, 71 WinCrt program calling Windows functions from, 331 ending, 72 interrupting, 71-72 WinCrt tips, 76-77 WINDEBUG.386, 55 WINDEBUG.DLL, 47 WinDOS, 84-85, 453, 463 Window, 134 adding control objects to, 577 adding graphics to, 168 adding text, graphics and other items, 134 adjusting line height and spacing, 185 background pattern, changing, 329 borders, clipped from view, 360 changes to horizontal or vertical, 194 checking if valid, 794 client area, 165, 168, 177, 206, 362, 412, 418, 582 closing, 31 creating with extended styles, 565 default settings, 565 direct communications between multiple, 572 displaying directly on desktop, 160 drawing shapes in, 170 finding messages for a specific, 550 forcing an immediate update, 201 giving startup parameters, 139 graphics, printing, 667 image used when displaying, 364 initializing, 172 inserting controls into, 611 invalidate, 200 main, 537 messages, sending to, 551 modifying style bits, 194 multiple, 165, 537, 562 obtaining handle to main application, 170 opening in random sizes and position, 139 painting backgrounds, 325 positioning the top left corner, 140 printing text displayed in, 663 printing the contents, 30 reducing the size, 194 scrollable, 699 scrolling, 77 Show method, 539 simulated dumb-terminal, 66 specifying width and height, 140 style, 360 switching to next, 35 system colors, changing, 617 update region, 201 Window background painting, 206 Window caption changing, 464 changing to selected path name, 464 Window class, 193 default name, 193 initializing to default values, 375 Window class name, 756 Window classes, 13, 478 Window dimension informing the scroll bars, 704 Window handles, 756 Window menu, 35, 817. See also MDI Window title, 132 Window caption, 430 resetting, 465 Window class, 583 Window title, 565 changing, 423, 565 Window, double border creating, 565 Windows Operating Environment and objects, 127 as a single-tasking DOS program, 8 conventional programming, 478, 480, 498, 550, 590, 603 development packages, 11 development system, 731 early versions, 5 patching custom code into, 603 prevent from shuffling memory, 831 printing, 652 printing, configuring for, 654 resource management, 226 shutting down, 739, 796 Windows 1.0, 5 Windows 2.0, 5-6 drivers, 686 Windows 2.1, 6 Windows 3.0, 3, 7, 11 advantages, 8-10 device driver support, 686 disadvantages, 10-11 modes, 8 Windows 3.0 software market for, 7 Windows 3.1, 7 Windows API, 78, 331 accessing, 708 Windows application constructing, 134 conventional, 318 shortest possible, 130 Windows Application Program Interface. See API Windows applications time, giving to other, 551 Windows Clipboard viewer, 748 Windows desktop, 562 Windows graphical interface key characteristics of, 229 Windows interface element for control objects, 579 Windows message, 135 associating an object's method, 121 finding details about individual, 133 mnemonic codes, 136 responding to specific, 134 viewing, 53-55 Windows message constant, 136 Windows message routines, 550 Windows Notepad, 663 Windows program minimum-size, 127 shutting down, 155 Windows routines calling, 78 requiring MSG data structures, 418 Windows software development state of, 796 Windows user interface keyboard commands, 136 WINDOWS.H, 12, 284, 441, 729 Windows/286, 6-7 Windows/386, 6-7 WinProcs, 78, 331, 708, 713, 715 described, 134 WinType, 141 WinTypes, 69, 78, 83, 133, 331, 708, 713, 715 described, 134 WINTYPES.INT, 284 WINTYPES.PAS, 166, 326, 626 Wirth, Niklaus, 86 wm_Char, 550 wm_Command, 133, 136, 238, 266, 271, 280, 283, 288, 293, 371, 688, 698 trapping, 289 unprocessed, 294 wm_Create, 573 wm_DDE messages, 777 wm_DDE_Ack, 776-777, 785, 793 wm_DDE_Data, 777-778, 785, 793-794 wm_DDE_Execute, 795 wm_DDE_Initiate, 776-777, 785 wm_DDE_Request, 777-778, 785, 794 wm_DDE_Terminate, 778-779, 785-786, 793-794 wm_DeadChar, 550 wm_Destroy, 121, 178, 573 wm_First, 121-122, 135-137, 166, 231, 266, 288, 410 wm_GetText, 433, 482, 498 wm_HScroll, 640-641 wm_InitDialog, 688 wm_InitMenu, 768 wm_InitMenuPopup, 768 wm_KeyDown, 550 wm_KeyUp, 550 wm_LButtonDblClk, 189 wm_LButtonDown, 133, 135, 140, 152, 189, 573 wm_LButtonUp, 189 wm_MButtonDblClk, 189 wm_MButtonDown, 189, 573 wm_MButtonUp, 189 wm_MDIActivate, 821 wm_MouseMove, 189, 199, 410 wm_Paint, 166, 168-169, 201, 249, 379, 385, 551, 641, 705, 818 wm_ParentNotify, 565, 573, 574 wm_Paste, 434 wm_RButtonDblClk, 189 wm_RButtonDown, 55, 135, 140, 189, 275, 573 wm_RButtonUp, 189 wm_SetText, 482 wm_Size, 704 wm_SysCommand, 266, 283 wm_Timer, 121, 171-172, 175, 178, 385 wm_VScroll, 640 WObjects, 64, 78, 101, 105, 121, 128, 608, 835 WOBJECTS.TPU, 57, 64 WordBool, 202 Words broken automatically at line end, 596 extracting from LongInt values, 331 Wordstar word processor, 34 WParam, 172, 191 WParamLo, 191 Write, 65, 69, 73, 647-648 Write and Writeln printing directly with, 649 WriteBuf, 73, 75, 111, 116 declared, 74 WriteChar, 73, 76, 116 Writeln, 65, 69, 73, 76, 86, 647-648 WritePrivateProfileString, 627 WriteProfileString, 627 WRT (Whitewater Resource Toolkit), 16, 42-45, 145, 223 memory management, 45 Resource Attributes, 149 WRT menu editor, 141, 151, 229, 234 ws_Caption, 565 ws_Child, 564, 567, 572-573, 578 ws_ChildWindow, 564 ws_ex_DlgModalFrame, 565 ws_ex_NoParentNotify, 565 ws_Ex_NoParentNotify, 573 ws_HScroll, 594, 703 ws_Maximize, 360 ws_OverlappedWindow, 564, 572, 574 ws_PopUp, 360, 564, 567 ws_PopupWindow, 564 ws_SysMenu, 572, 574 ws_TiledWindow, 564 ws_Visible, 564, 572, 578 ws_VScroll, 594, 703 Y Yes button, 463 Z Zortech C++, 14