The FORMATETC structure of print screen clipboard

On windows, when you press the print-screen key, the screenshot is saved into system clipboard in 3 formats:CF_BITMAP, CF_DIB, and CF_DIBV5. The FORMATETC structure for these formats are:

{2,1,-1,0,16}, {8,1,-1,0,5}, and {17,1,-1,0,5}

typedef struct tagFORMATETC {
CLIPFORMAT     cfFormat;
DVTARGETDEVICE *ptd;
DWORD          dwAspect;
LONG           lindex;
DWORD          tymed;
} FORMATETC, *LPFORMATETC;

The ptd, dwAspect, lindex fields are the same for the 3 formats:0,1, -1. The tymed is 16 for CF_BITMAP and 5(undocumented) for CF_DIB, and CF_DIBV5.

If you like my content, please consider buying me a coffee. Buy me a coffeeBuy me a coffee Thank you for your support!

Leave a Reply