Desktop Window and Desktop-Object Window

The OS/2 operating system automatically creates the desktop window (known as the workplace in user terminology) when it starts a PM session.

 ┌────────────────────────────────────────────────┐
 │    Desktop Window                              │
 │  ┌────────────────────────────┐                │
 │  │ Main Window 3              │                │
 │  │      ┌─────────────────────┴──────┐         │
 │  │      │ Main Window 2              │         │
 │  │      │      ┌─────────────────────┴──────┐  │
 │  │      │  ┌───┤ Main Window 1              │  │
 │  │      │  │Chi│  ┌───────────────┐         │  │
 │  │      │  │Win│  │               │         │  │
 │  │      │  │2A │  │               ├──────┐  │  │
 │  └──────┤  └───┤  │Child Window 1a│      │  │  │
 │         │      │  └────┬──────────┘      │  │  │
 │         └──────┤       │ Child Window 1b │  │  │
 │                │       └─────────────────┘  │  │
 │                └────────────────────────────┘  │
 └────────────────────────────────────────────────┘

Desktop Window Containing Windows of Several Applications The desktop window paints the background color of the screen and serves as the "progenitor" of all the windows displayed by all PM applications (but not of object windows, which do not require screen display). To make the desktop the parent in the WinCreateStdWindow function, you specify HWND_DESKTOP.

The windows immediately below the desktop are called main or top-level windows; these are called primary windows in user terminology. Every PM application creates at least one window to serve as the main window for that application. Most applications also create many other windows, directly or indirectly, to perform tasks related to the main window.

Each window helps display output and receive input from the user. The previous figure shows the desktop window containing windows of several applications. Notice that the main windows can overlap one another. (At times, it is possible for a main window to be completely hidden.) Operations in one main window normally do not affect the other main windows.

The desktop-object window is like a desktop window that is never displayed; it serves as the base window to coordinate the activity of an application's object windows. The desktop-object window cannot display windows nor process keyboard and mouse input. The primary purpose of the desktop-object window is to enable you to create windows that need not respond to messages at the same rate as the user interface.


[Back: About Windows]
[Next: Window Relationships]