Partager via


GetFormat Method

Determines if data in a specified format is available on the OLE drag-and-drop DataObject. Available at run time only.

oDataObject.GetFormat(nFormat | cFormat)

Parameters

  • nFormat| cFormat
    Specifies the format of the data to retrieve. The following table lists some of the formats with a description of each format. For more information about the data formats available, see the documentation for Visual C++ on the Microsoft Developer Network. You can also create your own format by specifying a unique character string for cFormat.

    Data Format*

    nFormat| cFormat

    Description

    CF_TEXT

    1

    Text format.

    CF_OEMTEXT

    7

    Text format containing characters in the OEM character set.

    CF_UNICODETEXT

    13

    Unicode text format.

    Note

    Available only for versions of Visual FoxPro running on Windows NT 4.0 or later.

    CF_FILES or CF_HDROP

    15

    A handle that identifies a list of files, such as a set of files dragged from the Windows Explorer.

    CFSTR_OLEVARIANTARRAY

    "OLE Variant Array"

    An array. Multiple values can be transferred in a single drag and drop operation with this format.

    For example, this format can be used to drag a set of items in a list box to another list box.

    CFSTR_OLEVARIANT

    "OLE Variant"

    A variant. All data types in Visual FoxPro are represented as variants. This format can be used to drag and drop Visual FoxPro data without losing the data type.

    CFSTR_VFPSOURCEOBJECT

    "VFP Source Object"

    A reference to the Visual FoxPro drag source object.

    \* Defined in FOXPRO.H.

    Remarks

    Applies To: DataObject Object

    The GetFormat method returns true (.T.) if the DataObject contains data in the format you specify with nFormat or cFormat; otherwise returns false (.F.).

    See Also

    Reference

    ClearData Method

    GetData Method

    OLE Drag-and-Drop

    SetData Method

    SetFormat Method

    Other Resources

    Methods (Visual FoxPro)

    Language Reference (Visual FoxPro)