Поделиться через


SetClipboardData (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

HANDLE SetClipboardData(
  UINT uFormat, 
  HANDLE hMem
); 

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 Embedded 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 Value

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 Embedded 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 Embedded CE does not provide support for an application to set clipboard data for a window owned by another process.

Requirements

Header winuser.h
Library Clipbd.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Clipboards Functions
GetClipboardData
RealizePalette
RegisterClipboardFormat
SelectPalette
WM_RENDERFORMAT
WM_RENDERALLFORMATS
BITMAPINFO