win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinQueryClipbrdFmtInfo (1.2)
Function Group  Overview  Message Group         Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINCLIPBOARD
 
BOOL WinQueryClipbrdFmtInfo(hab, fmt, pfsFmtInfo)
HAB hab;               /* handle of the anchor block             */
USHORT fmt;            /* specifies data format                  */
PUSHORT pfsFmtInfo;    /* receives memory model and usage flags  */
 
The WinQueryClipbrdFmtInfo function determines whether a particular format
of data is present in the clipboard and, if so, provides information about
that format.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hab         Identifies an anchor block.
 
fmt         Specifies the format of the data that this function queries. The
            following list describes the standard clipboard formats:
 
            Value           Meaning
            ────────────────────────────────────────────────────────────────
            CF_BITMAP       The data is a bitmap. The CFI_HANDLE
                            memory-model flag must be set in the pfsFmtInfo
                            parameter.
 
            CF_DSPBITMAP    The data is a bitmap representation of a private
                            data format. The clipboard viewer can use this
                            format to display a private format. The
                            memory-model flag CFI_HANDLE must be set in the
                            pfsFmtInfo parameter.
 
            CF_METAFILE     The data is a metafile. The CFI_HANDLE
                            memory-model flag must be set in the pfsFmtInfo
                            parameter.
 
            CF_DSPMETAFILE  The data is a metafile representation of a
                            private data format. The clipboard viewer can
                            use this format to display a private format. The
                            memory-model flag CFI_HANDLE must be set in the
                            pfsFmtInfo parameter.
 
            CF_TEXT         The data is an array of text characters, which
                            may include newline characters to mark line
                            breaks. The null character indicates the end of
                            the text data. The CFI_SELECTOR memory-model
                            flag must be set in the pfsFmtInfo parameter.
 
            CF_DSPTEXT      The data is a textual representation of a
                            private data format. The clipboard viewer can
                            use this format to display a private format. The
                            memory-model flag CFI_SELECTOR must be set in
                            the pfsFmtInfo parameter.
 
pfsFmtInfo  Points to a variable that receives the memory-model and usage
            (CFI) flags. It consists of a memory-model flag and a usage flag
            from the following lists:
 
            Memory-model flag  Meaning
            ────────────────────────────────────────────────────────────────
            CFI_SELECTOR       Handle is a selector plus zero offset to a
                               segment in storage.
 
            CFI_HANDLE         Handle is the handle to a metafile or
                               bitmap.
 
            Usage flag        Meaning
            ────────────────────────────────────────────────────────────────
            CFI_OWNERFREE     Handle is not freed by the WinEmptyClipbrd
                              function. The application must free the data
                              if necessary.
 
            CFI_OWNERDISPLAY  Format will be drawn by the clipboard owner in
                              the clipboard-viewer window by means of the
                              WM_PAINTCLIPBOARD message. The ulData
                              parameter should be NULL.
 
Return Value
 
The return value is TRUE if the format exists. Otherwise, it is FALSE,
indicating that the format does not exist.
 
Comments
 
For a description of the possible formats and data handles, see the
WinSetClipbrdData function.
 
See Also
 
WinOpenClipbrd, WinSetClipbrdData