• (C) Copyright IBM Corp. 1992
  • Cover
  • Version Notice
  • Abstract
  • Acknowledgements
  • Figures
    • Program Flow - Functional Decomposition Approach
    • Program Flow - Object-Oriented Approach
    • Subclassing an Application Object
    • Object-Oriented Development Progression
    • Encapsulation of Host Interaction Within Application Object
    • Message Flow in a Presentation Manager Application
    • Structure of an Application's Main Routine
    • Structure of a Window Procedure
    • Structure of a Dialog Procedure
    • Allocating Memory in Previous Versions of OS/2
    • Allocating Memory in OS/2 Version 2.0
    • Committing Storage During Allocation
    • Using a Guard Page With a Memory Object
    • Guard Page Exception Handler
    • Registering a Guard Page Exception Handler
    • Suballocating Memory
    • Allocating Shared Memory
    • Sample Application Main Routine (Part 1) - Registration
    • Sample Application Main Routine (Part 2) - Window Creation
    • WinAddSwitchEntry() Function
    • Storing Instance Data in Window Words
    • Retrieving Instance Data from Window Words
    • Releasing Instance Data Storage
    • WinSubclassWindow() Function
    • Subclass Window Procedure
    • WinDlgBox() Function
    • Communicating with a Control Window
    • Querying Information From a Control Window
    • Inserting an Item Into a List Box
    • Querying a Selected List Box Item
    • WinMessageBox() Function
    • Obtaining a Window Handle - WinQueryWindow() Function
    • Obtaining a Window Handle - WinWindowFromID() Function
    • Obtaining a Window Handle Using the Switch Entry
    • WinBroadcastMsg() Function
    • Calling External Macros
    • Workplace Shell Inheritance Hierarchy
    • Invoking a Method
    • Overriding an Existing Method
    • Adding a New Method
    • Adding an Item to a Context Menu
    • Invoking a Method via a Context Menu Item
    • Class Method Example
    • Invoking a Method in Another Object Class
    • A SOM Precompiler-generated Function Stub
    • Registering a Workplace Shell Object Class
    • Initializing Class Data
    • Freeing Class Data Items
    • Creating an Object
    • Object Setup
    • Initializing Instance Data
    • Opening an Object
    • Opening a Custom View of an Object
    • Automatically Instantiating an Object
    • Closing an Object
    • Saving an Object's State
    • Restoring an Object's State
    • Destroying an Object
    • Deregistering an Object Class
    • Creating a Transient Object
    • Workplace Shell Application Structure
    • Referencing an Object Using OBJECTID
    • Drag Initiation From a Container Window
    • Receiving a DM_PRINTOBJECT Message
    • Handling the DM_DRAGOVER Message
    • Handling the DM_DROP Message
    • Handling the DM_RENDER Message
    • Menu Bar Resource Definition
    • String Table Resource Definition
    • Loading a Text String Resource
    • Accelerator Table Resource Definition
    • Window Template Resource Definition
    • Dialog Template Resource Definition
    • Resource Script File
    • Loading Resources From a DLL
    • Loading a Dialog Resource From a DLL
    • Creating a Thread With an Object Window
    • Secondary Thread Creating an Object Window
    • Sample Object Window Procedure
    • Creating a Thread Without an Object Window
    • Starting a Child Process
    • DosKillThread() Function
    • Terminating a Process
    • Interprocess Communication Using Shared Memory (Part 1)
    • Interprocess Communication Using Shared Memory (Part 2)
    • Interprocess Communication Using Atoms (Part 1)
    • Interprocess Communication Using Atoms (Part 2)
    • Interprocess Communication Using Queues (Part 1)
    • Interprocess Communication Using Queues (Part 2)
    • Interprocess Communication Using Queues (Part 3)
    • Interprocess Communication Using Named Pipes (Part 1)
    • Interprocess Communication Using Named Pipes (Part 2)
    • Synchronization Using Presentation Manager Messages
    • Synchronization Using an Event Semaphore (Part 1)
    • Synchronization Using an Event Semaphore (Part 2)
    • Synchronization Using the DosWaitThread() Function (Part 1)
    • Synchronization Using the DosWaitThread() Function (Part 2)
    • DosWaitChild() Function
    • Dynamically Inserting a Menu Bar Item
    • Dynamically Inserting a Pulldown Menu
    • Disabling an Menu Bar/Pulldown Menu Item
    • Placing a Check Mark on a Pulldown Menu Item
    • Standard Dialogs - WinFileDlg() Function
    • WinFontDlg() Function - Sample Code
    • DosCreateThread() Function
    • DosAllocMem() Function
    • Declaring a 16-Bit Function in 32-Bit Code
    • Creating a 16-bit Window From Within a 32-bit Module
    • Passing a 16:16 Pointer as a Message Parameter
    • Mixed Model Programming - WinSetWindowThunkProc() Function
    • Mixed Model Programming - Thunk Procedure
    • 16:16 to 0:32 Address Conversion
    • Development Process for New WPS Classes
    • Compiling and Linking an OS/2 Presentation Manager Application
    • Sample Module Definition File for Presentation Manager
    • Sample Module Definition File to Create a DLL
    • IPF Tag Language Example
    • Simple Help Panel Source
    • Displaying a Bitmap in a Help Window
    • Hypertext Link
    • Hypergraphic Link
    • Link File With Multiple Hypergraphic Links
    • Multiple Viewports Using Automatic Links
    • Application-Controlled Viewport
    • Help Table Resource Definition
    • WinCreateHelpInstance() Function
    • WinAssociateHelpInstance() Function
    • WinDestroyHelpInstance() Function
    • Help Pulldown Menu Definition
    • Network Domains
    • Production Libraries on a LAN Server
  • Tables
    • Window Identifiers
    • Application Object/Window Correlation
    • Presentation Manager Macros
    • New Presentation Manager Functions in OS/2 Version 2.0
    • Type Prefixes for Symbolic Constants
    • Type Prefixes for Variables
    • Type Prefixes for Pointers
    • Memory Management Functions
    • Session Management Functions
    • Task Management Functions
    • Exception Handling Functions
    • Anonymous Pipe Functions
    • Named Pipe Functions
    • Queue Functions
    • Semaphore Functions
    • Message Retrieval Functions
    • Timer Services Functions
    • Dynamic Linking Functions
    • Device I/O Functions
    • File I/O Functions
    • Code Page Functions
    • Error Management Functions
  • Special Notices
  • Preface
  • Related Publications
  • Overview
    • User Interface
    • Object-Oriented Applications
      • Object-Oriented Design
      • Object-Action Interfaces
      • Benefits of the Object-Oriented Approach
    • Presentation Manager Application Model
      • Systems Application Architecture Conformance
      • Online Help and Documentation
    • The Workplace Shell
    • Summary
  • Operating System/2
    • History
    • Intel 80386 32-Bit Microprocessor Support
    • Memory Management
    • Multiprogramming and Multitasking
      • Application Support
      • Processes and Threads
      • Interprocess Communication and Synchronization
    • DOS Application Support
    • Microsoft Windows Application Support
    • Dynamic Linking
    • Summary
  • Object-Oriented Applications
    • Object-Oriented Concepts
      • Object-Oriented vs Functional Decomposition
      • Class-Based vs Module-Based
      • Subclassing
    • User View vs Application View
    • Object-Oriented Design
      • Object Identification
      • Action Identification
      • Search for Existing Objects
      • Message Definition
      • Method Design
    • Object-Oriented Implementations
    • More Complex Objects
      • Device Manipulation
      • Access to Remote Systems
      • Procedure Manuals
    • Summary
  • The Presentation Manager Application Model
    • Windows
      • Window Classes
      • Window Procedures
    • Messages
      • Message Classes
      • Message Structure
      • Message Processing
    • Application Structure
      • Main Routine
      • Window Procedures
      • Dialog Procedures
      • Subroutines
      • Partitioning the Application
    • Presentation Manager Resources
    • Creating Reusable Code
    • Window Hierarchy
      • Parent/Child Relationship
      • Window Ownership
      • Z-Order
    • Subclassing
    • Summary
  • The Flat Memory Model
    • DosAllocMem() Function
    • Allocating versus Committing Memory
      • Committing Storage at Allocation
      • Dynamically Committing Storage
    • Suballocating Memory
    • Exception Handling
    • Shared Memory Objects
      • Named versus Anonymous Shared Memory Objects
      • Committing Shared Memory Objects
    • Summary
  • Building a Presentation Manager Application
    • Language Considerations
    • Function and Data Types
    • Object-Oriented Programming Practices
    • Application Main Routine
    • Using Windows
      • Window Creation
      • Window Processing
      • Window Closure
      • Instance Data and Window Words
      • Subclassing a Window
    • Window Communication
      • Standard Windows
      • Dialog Boxes
      • Control Windows
      • Message Boxes
      • Identifying the Destination Window
      • Creating Message Parameters
      • Broadcasting Messages
    • Passing Control
      • Direct Invocation/Direct Return
      • Direct Invocation/Message Return
      • Message Invocation/Direct Return
      • Message Invocation/Message Return
      • External Macros
    • Terminating an Application
    • Summary
  • Workplace Shell and the System Object Model
    • Objects in the Workplace Shell
      • Inheritance Hierarchy
      • Metaclasses
      • Class Implementation
    • Object Structure
      • Methods
      • Subroutines
    • Defining an Object
      • Files
      • Class Definition File
      • C Implementation of an Object Class
    • Object Behavior
      • Creating an Object
      • Using an Object
      • Destroying an Object
      • Deregistering an Object Class
      • Accessing Presentation Manager Resources From a Workplace Shell Object
    • Transient Objects
    • Building a Workplace Shell Application
    • Communication Between Objects
      • Application-Initiated Communication
      • User-Initiated Communication
    • Summary
  • Direct Manipulation
    • Direct Manipulation Basics
      • Significant Events
      • Rendering Mechanisms
    • Data Structures Used in Drag/Drop
      • The DRAGINFO Structure
      • The DRAGITEM Structure
      • The DRAGIMAGE Structure
      • The DRAGTRANSFER Structure
    • Using Direct Manipulation
      • Initiating a Drag Operation
      • Dragging Over a Window
      • Dropping an Object
      • Transferring Information
    • Using Rendering Mechanisms
      • Standard Rendering Mechanisms
      • Implementing a Private Rendering Mechanism
    • Summary
  • Presentation Manager Resources
    • Types of Resources
      • Fonts
      • Icons, Pointers and Bitmaps
      • Menu Bars and Pulldown Menus
      • String Tables
      • Accelerator Tables
      • Help Tables
      • Window and Dialog Templates
    • Resource Script File
    • Using Resources
      • Loading From Within the Application
      • Loading Resources From a DLL
      • Loading Dialogs From a DLL
    • Resources and National Language Support
    • Summary
  • Multitasking Considerations
    • Creating a Secondary Thread
      • Threads Containing Object Windows
      • Threads Without Object Windows
    • Creating Another Process
    • Destroying a Secondary Thread
      • Threads Containing Object Windows
      • Threads Without Object Windows
      • Forcing Termination of a Thread
    • Terminating a Process
    • Communicating With a Secondary Thread
      • Threads Containing Object Windows
      • Threads Without Object Windows
    • Communicating With Another Process
      • Presentation Manager Messages
      • Shared Memory
      • Atoms
      • Queues
      • Queues (continued)
      • Pipes
    • Maintaining Synchronization
      • Presentation Manager Messages
      • Timers and Semaphores
      • DosWaitThread() Function
      • DosWaitChild() Function
    • Preserving Data Integrity
    • Client-Server Applications
    • Summary
  • Systems Application Architecture CUA Considerations
    • Standard Windows
    • The Menu Bar
      • Inserting/Deleting Menu Bar Items
      • Enabling/Disabling Items
      • Indicating Selected Items
    • Action Windows
      • Modeless Action Windows
      • Modal Action Windows
      • Standard Dialogs
      • Use of Control Windows
      • Message Boxes
    • Maintaining User Responsiveness
    • Summary
  • Application Migration
    • Data Types
    • Function Name Changes
    • 32-Bit Interface Constraints
    • Function Enhancements
      • Semaphore Functions
      • Thread Management
    • Memory Management
    • New Presentation Manager Functions
    • Summary
  • Mixing 16-Bit and 32-Bit Application Modules
    • Function Calls to 16-Bit Modules
    • Using 16-Bit Window Procedures
      • Creating a Window
      • Passing Messages to 16-Bit Windows
      • Passing Messages to 32-Bit Windows
    • Summary
  • Compiling and Link Editing an Application
    • Running the SOM Precompiler
      • The Makefile
      • SOM Precompiler Invocation
    • Compiling C Source Code
      • Module Definition File
      • Compiler Options
    • Link Edit
    • Resource Compilation
    • Dynamic Link Libraries
      • Creating a DLL
      • Using a DLL
      • Presentation Manager Resources in a DLL
      • Using Dialogs in System Object Model Objects
    • Summary
  • Adding Online Help and Documentation
    • Creating Help Information
      • IPF Tag Language
      • Defining Help Panels
      • Displaying Graphics
      • Hypertext and Hypergraphics
      • Viewports
    • Compiling Source Files
      • The IPFC Command
      • National Language Support
    • Linking Help Windows With Applications
      • Creating a Help Table
      • Creating a Help Instance
      • Associating a Help Instance
      • Ending a Help Instance
    • Displaying Help Panels
      • F1 Key
      • Help Menu Bar Item
      • Help Pushbutton
    • Main Help Window
      • The Help Pulldown Menu
      • Communication Between IPF and Applications
    • Stand-Alone Online Documentation
      • Compiling Online Documents
      • Concatenating Source Files
    • Application Tutorials
    • Self-Teaching Applications
      • Loosely Coupled Applications
      • Tightly Coupled Applications
    • Summary
  • Problem Determination
    • Problem Documentation
      • Window
      • Event/Action
      • First Time vs Repetitive Actions
    • Problem Isolation
    • Problem Diagnosis
      • First Time Problems
      • Repetitive Action Problems
    • Post-Resolution Action
    • Summary
  • Generic Application Modules
    • Generic Application Objects
      • Display Windows
      • Object Windows
      • Subclassing
    • Dialog Boxes
    • Generic Subroutines
    • Granularity
    • Packaging
    • Summary
  • Managing Development
    • Risk Management
      • Technological Risk
      • Managerial Risk
    • Configuration/Library Management
      • Terminology
      • Network Organization
      • Common Access to Resources
      • Update/Modification of Resources
      • Administration
    • Summary
  • Naming Conventions
    • Symbolic Names and Constants
    • Subroutine Names
    • Window and Dialog Procedure Names
    • Variable Names
  • Application Program Construction
    • Modularization
    • Header Files
      • Private Header File
      • External Interface Header File
      • Global Header File
      • Generic Routines Header File
      • System-Supplied Header Files
    • Data Abstraction and Encapsulation
    • Packaging
      • Application Object Modules
      • Application Executable File
      • Dynamic Link Libraries
  • OS/2 Kernel API Functions
    • Memory Allocation and Management
    • Session Management
    • Task Management
    • Signal and Exception Handling
    • Interprocess Communication
      • Anonymous Pipes
      • Named Pipes
      • Queues
      • Semaphores
    • Message Retrieval
    • Timer Services
    • Dynamic Linking
    • Device I/O
    • File I/O
    • Code Page Support
    • Error Management
  • Problem Reporting Worksheet
    • Problem Reporting Worksheet.
  • Glossary
    • ACDI
    • action
    • action window
    • address conversion
    • address translation
    • ancestor
    • API
    • APPC
    • application-controlled viewport
    • application-modal
    • application object
    • application resource
    • ASCII
    • asynchronous processing
    • baselining
    • base storage class
    • bit
    • byte
    • CASE
    • cdecl
    • checkout
    • child window
    • class-based
    • class data
    • class definition file
    • client area
    • client-server
    • client window
    • Common Programming Interface
    • Common User Access
    • compatability region
    • compatability region mapping algorithm
    • complex viewport
    • context switching
    • control
    • Control Panel
    • control window
    • cooperative multitasking
    • CPI
    • CRMA
    • CUA
    • DASD
    • data object
    • descendant
    • desktop
    • development resource
    • dialog
    • dialog box
    • Dialog Box Editor
    • dialog procedure
    • direct manipulation
    • DLL
    • domain
    • dormant
    • DOS
    • DOS Compatibility Box
    • DOS settings
    • drag and drop
    • dragitem
    • drawdown
    • dynamic linking
    • dynamic link library
    • EHLLAPI
    • encapsulation
    • entity
    • event-driven
    • event semaphore
    • exception handler
    • execution instance
    • exportable entry point
    • external entity
    • external reference
    • EXPORTS statement
    • far call
    • FIFO
    • flat memory model
    • focus
    • Font Editor
    • frame area
    • frame window
    • functional decomposition
    • GB
    • graphical model
    • GRE
    • guard page
    • guard page exception
    • help instance
    • help library
    • help panel
    • help window
    • Hungarian notation
    • hypergraphics
    • hypertext
    • icon
    • Icon Editor
    • import library
    • IMPORTS statement
    • Information Presentation Facility
    • inheritance
    • inheritance hierarchy
    • input focus
    • instance
    • instance data
    • Interface Control Document
    • IPF
    • IPF compiler
    • IPF-controlled viewport
    • IPF tag language
    • KB
    • LAN
    • LIFO
    • load-time dynamic linking
    • local area network
    • logical data entity
    • MB
    • memory object
    • menu bar
    • message
    • message box
    • message class
    • metaclass
    • method
    • mixed model programming
    • modal
    • modeless
    • module-based
    • module definition file
    • Multiple Virtual DOS Machines
    • multiprogramming
    • multitasking
    • multithreading
    • Mutex semaphore
    • MuxWait semaphore
    • near call
    • NPX
    • object
    • object class
    • object window
    • online document
    • online document window
    • Operating System/2
    • optimized window
    • optlink
    • OS/2
    • page
    • parent
    • pascal
    • PC DOS
    • persistent
    • pipe
    • polymorphism
    • pre-emptive multitasking
    • Presentation Interface
    • Presentation Manager
    • presentation space
    • primary thread
    • private semaphore
    • procedural entity
    • process
    • process address space
    • production-level
    • programmable workstation
    • promotion
    • protect mode
    • PTDA
    • pulldown menu
    • PWS
    • queue
    • real mode
    • rendering mechanism
    • resource
    • resource compiler
    • resource script file
    • REXX
    • run-time dynamic linking
    • SAA
    • scheduler
    • secondary thread
    • segment
    • segmented memory model
    • seg16
    • semaphore
    • shared semaphore
    • siblings
    • simple viewport
    • SNA
    • SOM
    • SOM Precompiler
    • source
    • sparse object
    • SQL
    • SRPI
    • structured programming
    • subclassing
    • synchronous processing
    • system
    • system-modal
    • system object model
    • Systems Application Architecture
    • target
    • task state
    • thread
    • thunking
    • thunk procedure
    • timer
    • title bar
    • transient object
    • TSR
    • user-level
    • view
    • viewport
    • VIO
    • window
    • window class
    • window handle
    • window procedure
    • window words
    • winproc
    • Workplace Environment
    • Workplace Shell
    • Workplace Shell object
    • z-order
    • 0:32
    • 16:16
    • 80286
    • 80386
    • 80486
    • 8086/8088
    • _far16
    • _Seg16
    • #pragma linkage
    • #pragma seg16
    • #pragma stack16