13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SefClassWordCommentsThe SetClassWord function should be used with care. For example, it ispossible to change the background color for a class by usingSetClassWord, but this change does not cause all windows belonging tothe class to be repainted immediately.To access any extra four-byte values allocated when the window-classstructure was created, use a positive byte offset as the index specified bythe nlndex parameter, starting at zero for the first four-byte value in theextra space, 4 for the next four-byte value and so on.SetClipboardDataSyntaxParametersReturn valueCommentsHANDLE SetClipboardData(wFormat, hMem)function SetClipboardData(Format: Word; Mem: THandle): THandle;This function sets a data handle to the clipboard for the data specified bythe hMem parameter. The data are assumed to have the format specifiedby the wFormat parameter. After setting a clipboard data handle, theSetClipboardData function frees the block of memory identified by hMem.wFormathMemWORD Specifies a data format. It can be anyone of thepredefined formats given in Table 4.13, "Predefined dataformats."In addition to the predefined formats, any format valueregistered through the RegisterClipboardFormat functioncan be used as the wFormat parameter.HANDLE Identifies the global memory block that containsthe data in the specified format. The hMem parameter can beNULL. When hMem is NULL the application does not haveto format the data and provide a handle to it until requestedto do so through a WM_RENDERFORMAT message.The return value identifies the data and is assigned by the clipboard.Once the hMem parameter has been passed to SetClipboardData, the blockof data becomes the property of the clipboard. The application may readthe data, but should not free the block or leave it locked.Table 4.13 shows the various predefined data-format values for thewFormat parameter:Chapter 4, Functions directory 491

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!