wpRenderFromClipboard
Appearance
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method opens the clipboard and retrieves the type of data specified in the clipboard format passed in. It then writes the clipboard data to a file.
Syntax
_wpRenderFromClipboard(somSelf, aRenderAs)
Parameters
- somSelf (WPDataFile *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDataFile.
- aRenderAs (ULONG) - input
- An atom representing the clipboard format.
- See **Presentation Manager Programming Guide - Advanced Topics** for information on using atoms for defining clipboard formats.
Returns
- rc (BOOL) - returns
- Success indicator
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is not generally overridden.
Usage
This method can be called at any time to retrieve the contents of the clipboard and write it to a data file.
Example Code
#define INCL_WINWORKPLACE #include <os2.h> WPDataFile *somSelf; /* Pointer to the object on which the method is being invoked. */ ULONG aRenderAs; /* An atom representing the clipboard format. */ BOOL rc; /* Success indicator */ rc = _wpRenderFromClipboard(somSelf, aRenderAs);
Remarks
The clipboard format specified must be compatible with the type of data file being written.
Example Code
This example gets a bitmap from the clipboard and writes it to the data file. If the clipboard does not contain a bitmap, the data file is not updated.
_wpRenderFromClipboard(BitmapFile,CF_BITMAP);