Share via


SetClipboardData (Windows CE 5.0)

Send Feedback

This function places data on the clipboard in a specified clipboard format.

HANDLESetClipboardData(UINTuFormat, HANDLEhMem);

Parameters

  • uFormat
    [in] Unsigned integer that specifies a clipboard format. This parameter can be a registered format or any of the standard clipboard formats. Windows CE supports the following standard clipboard values.

    Value Description
    CF_BITMAP Not supported.
    CF_DIB A memory object containing a BITMAPINFO structure followed by the bitmap bits.
    CF_DIF Software Arts' Data Interchange Format.
    CF_PALETTE Handle of a color palette. Whenever an application places data in the clipboard that depends on or assumes a color palette, it should place the palette on the clipboard as well.

    If the clipboard contains data in the CF_PALETTE (logical color palette) format, the application should use the SelectPalette and RealizePalette functions to realize (compare) any other data in the clipboard against that logical palette.

    When displaying clipboard data, the clipboard always uses as its current palette any object on the clipboard that is in the CF_PALETTE format.

    CF_PENDATA Data for the pen extensions to the Microsoft® Windows® for Pen Computing.
    CF_RIFF Represents audio data more complex than can be represented in a CF_WAVE standard wave format.
    CF_SYLK Microsoft Symbolic Link (SYLK) format.
    CF_TEXT Text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data. Use this format for ANSI text.
    CF_WAVE Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz pulse code modulation (PCM).
    CF_TIFF Tagged-image file format.
    CF_UNICODETEXT Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data.
  • hMem
    [in] Handle to the data in the specified format. This parameter can be NULL, indicating that the window provides data in the specified clipboard format (renders the format) upon request. If a window delays rendering, it must process the WM_RENDERFORMAT and WM_RENDERALLFORMATS messages.

    After SetClipboardData is called, the system owns the object identified by the hMem parameter. The application can read the data, but must not free the handle or leave it locked. If the hMem parameter identifies a memory object, the object must have been allocated using the LocalAlloc function.

Return Values

The handle of the data indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

The data to be set into the clipboard should be allocated using the LocalAlloc function.

Windows CE does not perform any implicit conversions between formats.

The window must be the current clipboard owner, and the application must have called the OpenClipboard function.

Windows CE does not provide support for an application to set clipboard data for a window owned by another process.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Clipbd.lib.

See Also

GetClipboardData | RealizePalette | RegisterClipboardFormat | SelectPalette | WM_RENDERFORMAT | WM_RENDERALLFORMATS | BITMAPINFO | Clipboards Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.