|
OleFlushClipboard
Carries out the clipboard shutdown sequence. It also releases the instance of
the IDataObject interface that was placed on the clipboard by the OleSetClipboard function.
HRESULT OleFlushClipboard();
Return Values
S_OK
Indicates the clipboard has been flushed.
CLIPBRD_E_CANT_OPEN
Indicates the Windows OpenClipboard function used within OleFlushClipboard failed.
CLIPBRD_E_CANT_CLOSE
Indicates the Windows CloseClipboard function used within OleFlushClipboard failed.
Comments
If you are writing an application that can act as the source of a clipboard
operation, you can call OleFlushClipboard to flush the clipboard and release the instance of IDataObject when your application is closed (e.g., if the user exits from your
application). A call to the OleSetClipboard function using NULL will empty the clipboard.
The difference is that OleFlushClipboard leaves all formats offered by the data transfer object, including the OLE 1
compatibility formats, on the clipboard so they are available after application
shutdown. In addition to OLE 1 compatibility formats, these include all formats
offered on a global handle medium (all except for TYMED_FILE) and formatted
with a NULL target device.
When your application closes, you should call OleSetClipboard using NULL if there is no need to leave data on the clipboard after shutdown
or if data will be placed on the clipboard using the standard Windows clipboard
functions. Applications should call OleFlushClipboard to enable pasting and paste-linking of OLE objects after shutdown.
Before calling OleFlushClipboard, it must be convenient to check the clipboard. You can call the OleIsCurrentClipboard function to determine if your data is still on the clipboard.
See Also
OleSetClipboard, OleIsCurrentClipboard, IDataObject,
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|