Clipboard Support

OS/2 Version 2.0 provides clipboard support between Windows applications, in the same or separate VDMs, as well as support between Windows applications and OS/2 Presentation Manager applications. The clipboard serves as a data-exchange feature acting as a common area to store data handles through which applications exchange formatted data. The same data may be represented in a number of different formats as specified by the application. Note that objects in the clipboard may be of any size and format.

The combined OS/2 and Windows clipboard environment under OS/2 Version 2.0 is shown in Figure "OS/2 Version 2.0 Clipboard Environment".

Data is formatted in either a predefined or private format, before being copied to the clipboard. In most cases the data is copied to pre-allocated global memory and a function call is used to copy the memory handle to the clipboard. Windows provides a number of predefined data formats:

TEXT

OEMTEXT PICTURE BITMAP DIB BITMAP SYLK DIF TIFF Any Private Format

These formats will be recognized and exported/imported by the global clipboard server.

Data formats which are not supported by the clipboard server, cannot be transferred. Such formats can only be handled by the local clipboards. This means that such formats may only be used to exchange data between Presentation Manager applications, or between Windows applications running in the same VDM. In addition, some of the data formats will also be converted, because of several differences between Windows and Presentation Manager data structures. This is further discussed in WIN-OS/2 Clipboard Support (Scenario 3 - Cut/Paste Between OS/2 And WIN-OS/2).

The OwnerDraw feature in the Windows clipboard is only supported within a MAVDM, as shared memory is required. OwnerDraw is a process whereby a Windows application takes control over the appearance of menu items and has responsibility for managing these menu items.

The native Microsoft Windows 3.0 clipboard provides support for both Windows applications and non-Windows applications. Non-Windows applications (that is, "native" DOS applications) run in either full-screen or "windowed" mode. This kind of environment is not supported in a MAVDM, because it is supported by the Workplace Shell directly. Therefore, clipboard support for native DOS applications is provided through Presentation Manager.

Should the user wish to capture the contents of a VDM running in full-screen mode, the following approach is adopted:

  • Switch to the Presentation Manager screen containing the VDM

  • Select the System menu on the VDM icon

  • Select Copy All.

    This procedure will copy the VDM's video buffer to the Presentation Manager clipboard (either in ASCII format or as a Presentation Manager bitmap).

    Selective copy is available in windowed mode. When a VDM is running in a window, the user may mark a specific rectangular area which will then be copied into the clipboard.

    This level of clipboard data exchange is fully supported by the VDM itself. The Windows kernel is not involved at all.


    [Back: Deleting Fonts for WIN-OS/2 ATM]
    [Next: WIN-OS/2 Clipboard Support]