Консультация № 55532
15.09.2006, 12:41
0.00 руб.
0 3 2
Некое приложение загоняет изображение в Clipboard. Вопрос: как я могу проанализоровать его?

Обсуждение

Неизвестный
15.09.2006, 13:15
общий
это ответ
Здравствуйте, Васильев Н.Ю.!
IsClipboardFormatAvailable(CF_BITMAP)
OpenClipboard
GetClipboardData(CF_BITMAP)
CloseClipboard
Неизвестный
15.09.2006, 15:08
общий
это ответ
Здравствуйте, Васильев Н.Ю.!

Из MSDN:

The GetClipboardData function retrieves data from the clipboard in a specified format. The clipboard must have been opened previously.

Syntax

HANDLE GetClipboardData( UINT uFormat
);
Parameters

uFormat
[in] Specifies a clipboard format. For a description of the standard clipboard formats, see Standard Clipboard Formats .
Return Value

If the function succeeds, the return value is the handle to a clipboard object in the specified format.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.


Remarks

An application can enumerate the available formats in advance by using the EnumClipboardFormats function.

The clipboard controls the handle that the GetClipboardData function returns, not the application. The application should copy the data immediately. The application must not free the handle nor leave it locked. The application must not use the handle after the EmptyClipboard or CloseClipboard function is called, or after the SetClipboardData function is called with the same clipboard format.

The system performs implicit data format conversions between certain clipboard formats when an application calls the GetClipboardData function. For example, if the CF_OEMTEXT format is on the clipboard, a window can retrieve data in the CF_TEXT format. The format on the clipboard is converted to the requested format on demand. For more information, see Synthesized Clipboard Formats.

Windows 95/98/Me: The Microsoft® Layer for Unicode (MSLU) supports GetClipboardData to provide support for synthetic clipboard formats. For more information, see Synthesized Clipboard Formats. To use this version of GetClipboardData, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Смотрите также:
OpenClipboard();
CloseClipboard();
SetClipboardData( UINT uFormat, HANDLE hMem );
Из форматов Вас, наверное, заинтересуют: CF_BITMAP, CF_TIFF и подобные.
Можно общаться с Clipboard через DDE, но это целая тема...
Неизвестный
18.09.2006, 11:39
общий
Коллеги, большое спасибо!Вы оказали мне очень своевременную и существенную поддержку.Ещё раз Спасибо!
Форма ответа