Cover Figures Preface Acknowledgments Chapter1: Tools |
Committing MemoryChapter 3: Multitasking
Suballocating Memory
Shared Memory
DosAllocMem or malloc
The SchedulerChapter 4: File I/O and Extended
The Subtleties of Creating a Thread
Threads and the C Runtime
A Thread Example
The Thread Output
Executing a Program
Sessions
Extended AttributesChapter 5: Interprocess Communication
EAs-Fragile: Handle with
The LIBPATH.C Example
Getting the File Size
Opening a File
Reading a File
More on DosOpen
An Extended Attribute Example: CHKEA.C
An OS/2 Named Pipe Client-Server ExampleChapter 6: DLLs
DOS-OS/2 Client-Server Connection
An OS/2 QUEUE Client-Server Example
An OS/2 Semaphore vs. Flag Variable Example
DLL OverviewChapter 7: Exception Handling
Thunking
DLL Performance
Simple DLL Example (32-32)
Creating the .EXE and the DLL
16-32, 32-16 Transitions
Call a 32-Bit DLL from ii 16-Bit
Pointer Declarations
Calling a 16-Bit DLL from a 32-Bit Program
Loading/Unloading of DLLs
Optimizing Performance in DLLs
How to Register an Exception HandlerChapter 8: Interfacing with OS/2 Devices
What an Exception Handler Looks
Signal Exceptions
Dos and Don'ts for Exception
DosExitList and Exception Handlers
A Guard Page Example
Summary
Serial Interface Example Using DosDevIOCtl .Chapter 9: Introduction to Windows .
Serial Interface Example Using inp .
Introduction .Chapter 10: Window Management
What Is a Window?
The INCLUDE Files
The Window Procedure Definition
Helper Macros
Presentation Manager Program Initialization
Creating a New Class
Creating a Window
Message, Message, Who's Got the Message ?
Terminating a Program
The Window Procedure Revisited
Parents and Owners
Window Stylin'
Another Window Example: WINDOW
The Presentation Manager Coordinate Space
More on Window Painting
Painting by Numbers
Enumerating Windows
WriteWindowInfo
The DrawString function
Presentation Spaces
Window Words
Control Windows
Presentation Parameters
Visible, Invisible, Enabled, and Disabled WindowsChapter 11: Window Messages and Queues
Window sizing
Device Independence, Almost
Subclassing the Frame Window
In Case of Error, Use the Class Default
Tracking the Frame.
Saving Window Settings
WinRestoreWindowPos
X,Y,Z - Order
Saving State
Message OrderingChapter 12: Resources
Focus Messages
Size and Paint Messages
The Last Messages a Window Receives
Sending Messages
Broadcasting Messages
Peeking into the Message Queue
Finding More Message Queue Information
Message Priorities
Messages and Synchronization of Events
User-Defined Messages
Some words about using window messages with non-PM threads
More About Resources, I Would KnowChapter 13: Dialog Boxes
Resource Files
Using the Resource Compiler
Pointers and Icons
Bitmaps
String Tables
Accelerators
Dialog Boxes
Menus
Help Tables
Application-defined Data .
The Dialog Box Template
The Client Window Procedure
Creating a Modal Dialog Box
Creating a Modeless Dialog Box
The Dialog Procedure DlgProc
WM_COMMAND and Dialogs.
Summary
Menus: The Keyboard and the MouseChapter 15: List Boxes
Mnemosyne's Mnemonics
Menu Styles
Menu Item Styles
The Resource File
Menu Item Attributes
Creating the Menu Bitmap
The Client Window Procedure ClientWndProc
The User Function displayMenuInfo
Pop-up Menus
Creating a Pop-up Menu
I Think I Can, I Think Icon
Popping Up a Menu
The Workhorse Function WinPopupMenu
List Box StylesChapter 16: Buttons
Extended Selection
Initializing the Client Window
Initializing the List Box
The WM_COMMAND Message Dialog Processing
Processing the UM_LISTBOXSEL Message
The Client Window Painting Routine
Owner-Drawing Controls
DlgProc
The WM_MESSAGE message
The WM_DRAWITEM message
An Introduction to Owner-drawn States
Drawing the List Box Labels
Drawing the Bitmaps
Summary
Button Styles
Example Program
The BUTTON.RC Resource File
DlgProc
Dialog Units-Can We Talk?
Button Actions
Summary
Entry Field BasicsChapter 18: Multiline Edit Controls
Selection Basics
The Entry Field and the Clipboard
And Other Things
ENTRY I-Entry Field Samples
Terminology, Etc.Chapter 19: Other Window Classes
MLE1
How to Upset a User Rather Quickly
No Refreshment
Clipboard Support
Navigation without a Sextant
Line by Line
Searching for What Was That Again ?
As If That Weren't Enough
Combo BoxesChapter 20: Drag and Drop
Frames
Scrollbars
Statics
Titlebars
Tennis, Anyone ?Chapter 21: Value Set
Initialization Code for Drag and Drop Source
Things Never Told to the Programmer That Should Have Been
Direct Manipulation Is a Real Drag
And Now a Word from Our Sponsor
Data Transfer
A Concrete Example
More Cement, Please
DrgDragFiles
From the Top Now
Pickup and Drop
Functions Used for Lazy Drag
Lazy Drag Sample
Value Set StylesChapter 22: Notebook
The VALUE.RC Resource File
Initializing the Value Set
Value Set Selection Notification
VALUE Paint Processing
The User-defined Message UM_UPDATE
Notebook PagesChapter 23: Containers
Flipping Pages
Creating a Notebook
InitializeNotebook
Container ViewsChapter 24: Spin
Container Styles
LPs or 45s ?
Half Full or Half Empty ?
Icon, Name, and Text Views
Tree View
Details View
Splitbars
Of Emphasis and Pop-ups
Direct Editing
Of Sorting and Filtering
Where Does Direct Manipulation Fit In ?
Summary
Spin Button Styles
Accelerator
WM_CREATE Processing
WM_CONTROL Processing
WM_COMMAND Processing
WM_PAINT Processing
Chapter 25: Sliders
Linear Slider StylesChapter 26: Font and File Dialogs
Creating a Linear Slider
A Linear Slider Example Program
Initializing the Slider
Using an Ownerdrawn Slider
Circular Sliders
Circular Slider Styles
Creating a Circular Slider
A Circular Slider Example Program
Initializing the Slider
Circular Slider Colors
Summary
The File DialogChapter 27: Subclassing Windows
Special Considerations for Multiple File Selections
The FILEDLG Example Program
The Window Word
Putting it All Together: FindFile
Initializing the FILEDLG Structure
The Font Dialog
An Example Program: FONTDLG
Customizing the Font Dialog
Querying the Current Font
Initializing the Font Dialog Structure with the Current Font
Bringing Up the Font Dialog
SuperclassingChapter 28: Presentation Manager Printing
A Printer's OverviewChapter 29: Help Manager
Where's My Thing ?
I Want That with Mustard, Hold the Mayo, No Onions, Extra Ketch
Where Were We?
Application ComponentsChapter 30: Multithreading in Presentation Manager Applications
The Application Source
Messages
The Help Tables
Sample HELPTABLE
Message Boxes
Fishing, Anyone ?
The Help Panels
Sample Help Panel
Putting It All Together
Restrictions
Using HELP TABLEs for Message Box Help
IntroductionChapter 31:
Types of Threads
Designing the Architecture
Data Communications
Entry and Exit Points
What Have We So Far ?
User Feedback
User Feedback Example
Synchronicity
Synchronous Threading Example
Object Windows
Building a Blind Window
Design Considerations
ColorSelect control
Usage of ColorSelect control
Appendix A - Window Messages
Dialog Box MessagesAppendix B-References
Button Messages
List Box Messages
Notebook Messages
Value Set Messages
Slider Messages
Circular Slider Messages
File Dialog Messages
Font Dialog Messages
Menu Messages
Entryfield Messages
Spin Button Messages
Help Manager Messages
Drag and Drop Messages
Container Messages