|
Memory and the Clipboard
A memory object that is to be placed on the clipboard should be allocated by
using the GlobalAlloc function with the GMEM_DDESHARE and GMEM_MOVEABLE flags.
Once a memory object is placed on the clipboard, ownership of that memory
handle is transferred to the system. When the clipboard is emptied and the memory
object has one of the following clipboard formats, the system frees the memory
object by calling the indicated Win32 function:
Function called to free object
| Clipboard format
| DeleteMetaFile
| CF_DSPENHMETAFILE
|
| CF_DSPMETAFILEPICT
|
| CF_ENHMETAFILE
|
| CF_METAFILEPICT
| DeleteObject
| CF_BITMAP
|
| CF_DSPBITMAP
|
| CF_PALETTE
| GlobalFree
| CF_DIB
|
| CF_DSPTEXT
|
| CF_OEMTEXT
|
| CF_TEXT
|
| CF_UNICODETEXT
|
When the clipboard is emptied of a memory object whose clipboard format is not
shown in the preceding list, the application itself must free the memory
object.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.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 (tapi.hlp)
Unix Manual Pages
|