Functions

Functions

GuiDragDropStatus mdlWindow_dragDropRegister (MSWindowP gwP)
 Registers a window as a possible drop target. More...
 
GuiDragDropStatus mdlWindow_dragDropRevoke (MSWindowP gwP)
 Unregisters/revokes a window as a possible drop target. More...
 
void mdlWindow_dragDropHasTarget (MSWindowP gwP, bool bHasTarget)
 Sets/clears a window's "has a drop target" flag. More...
 
GuiDragDropStatus mdlWindow_dragDropDo (MSWindowP gwP, DialogItem *diP, GuiDataObject *pDataObject, UInt32 ulEffectsAllowed)
 Starts a Drag & Drop operation. More...
 
GuiDataObjectmdlDataObject_create (UInt32 cfFormat, UserDataP pAppData, Int32 iDataSize)
 Creates a GuiDataObject to be used in further Drag and Drop functions. More...
 
StatusInt mdlDataObject_destroy (GuiDataObject *pDataObject)
 Destroys a GuiDataObject. More...
 
UserDataP mdlDataObject_getApplicationData (GuiDataObject *pDataObject, UInt32 cfFormat)
 Retrieves the application's data pointer originally passed into mdlDataObject_create or mdlDataObject_addFormat. More...
 
StatusInt mdlDataObject_addFormat (GuiDataObject *pDataObject, UInt32 cfFormat, UserDataP pAppData, Int32 iDataSize)
 Adds a clipboard format and associated data to the GuiDataObject. More...
 
bool mdlDataObject_isFormatAvailable (GuiDataObject *pDataObject, UInt32 cfFormat)
 Determines whether a particular clipboard format is associated with the GuiDataObject. More...
 
UserDataP mdlDataObject_getData (GuiDataObject *pDataObject, UInt32 cfFormat)
 Retrieves a copy of the data from the GuiDataObject. More...
 
StatusInt mdlDataObject_getDataHere (UserDataP pBuffer, Int32 iBufferSize, GuiDataObject *pDataObject, UInt32 cfFormat)
 Retrieves the data from the GuiDataObject and copies it into the caller-supplied buffer. More...
 
struct IDataObject * mdlDataObject_getIDataObject (GuiDataObject *pDataObject)
 Retrieves the Windows IDataObject interface pointer. More...
 
Int32 mdlDataObject_getDragFileCount (GuiDataObject *pDataObject)
 Retrieves the number of files listed in an CF_HDROP data object. More...
 
Int32 mdlDataObject_getDragFile (WCharP pBuffer, Int32 iBufferSize, GuiDataObject *pDataObject, Int32 iFile)
 Retrieves the file name at a certain index within an CF_HDROP data object. More...
 
Int32 mdlDataObject_getFormatCount (GuiDataObject *pDataObject)
 Retrieves the number of clipboard formats in the GuiDataObject. More...
 
StatusInt mdlDataObject_getFormat (UInt32 *pCfFormat, GuiDataObject *pDataObject, Int32 iIndex)
 Retrieves the format at a particular index in the GuiDataObject. More...
 

Detailed Description

Function Documentation

StatusInt mdlDataObject_addFormat ( GuiDataObject pDataObject,
UInt32  cfFormat,
UserDataP  pAppData,
Int32  iDataSize 
)

Adds a clipboard format and associated data to the GuiDataObject.

Parameters
[in]pDataObjectThe GuiDataObject to add a format and data to.
[in]cfFormatA pre-defined or registered Clipboard format. Use mdlClipboard_registerClipboardFormat to register your own Clipboard formats.
[in]pAppDataThe data to drop onto a target.
[in]iDataSizeThe size, in bytes, of the data pointed to by pAppData.
Returns
SUCCESS, or non-zero if error occurred.
Remarks
Required Library: mdlbltin.lib
GuiDataObject* mdlDataObject_create ( UInt32  cfFormat,
UserDataP  pAppData,
Int32  iDataSize 
)

Creates a GuiDataObject to be used in further Drag and Drop functions.

Parameters
[in]cfFormatA pre-defined or registered clipboard format. Use mdlClipboard_registerClipboardFormat to register your own clipboard formats.
[in]pAppDataThe data to drop onto a target.
[in]iDataSizeThe size, in bytes, of the data pointed to by pAppData.
Returns
Pointer to a new GuiDataObject, which can be used in subsequent DataObject or Drag and Drop functions.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDataObject_destroy ( GuiDataObject pDataObject)

Destroys a GuiDataObject.

Parameters
[in]pDataObjectThe GuiDataObject to be destroyed
Returns
SUCCESS, or non-zero if error occurred.
Remarks
Required Library: mdlbltin.lib
UserDataP mdlDataObject_getApplicationData ( GuiDataObject pDataObject,
UInt32  cfFormat 
)

Retrieves the application's data pointer originally passed into mdlDataObject_create or mdlDataObject_addFormat.

Parameters
[in]pDataObjectThe GuiDataObject from which to get the application data pointer.
[in]cfFormatA pre-defined or registered Clipboard format. This should be a cfFormat used in an mdlDataObject_create call or mdlDataObject_addFormat call.
Returns
The application data pointer.
Remarks
Required Library: mdlbltin.lib
UserDataP mdlDataObject_getData ( GuiDataObject pDataObject,
UInt32  cfFormat 
)

Retrieves a copy of the data from the GuiDataObject.

Parameters
[in]pDataObjectThe GuiDataObject from which to retrieve the data.
[in]cfFormatA pre-defined or registered Clipboard format.
Returns
Pointer to a copy of the data. This memory must eventually be freed using dlmSystem_mdlFree.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDataObject_getDataHere ( UserDataP  pBuffer,
Int32  iBufferSize,
GuiDataObject pDataObject,
UInt32  cfFormat 
)

Retrieves the data from the GuiDataObject and copies it into the caller-supplied buffer.

Parameters
[in]pBufferThe buffer receiving the data.
[in]iBufferSizeThe size, in bytes, of the buffer receiving the data.
[in]pDataObjectThe GuiDataObject from which to retrieve the data.
[in]cfFormatA pre-defined or registered Clipboard format.
Returns
SUCCESS if the data could be retrieved, or ERROR if it could not.
Remarks
Required Library: mdlbltin.lib
Int32 mdlDataObject_getDragFile ( WCharP  pBuffer,
Int32  iBufferSize,
GuiDataObject pDataObject,
Int32  iFile 
)

Retrieves the file name at a certain index within an CF_HDROP data object.

Parameters
[in]pBufferBuffer receiving the file name.
[in]iBufferSizeNumber of characters in the buffer receiving the file name.
[in]pDataObjectThe GuiDataObject from which to get the number of files listed.
[in]iFileIndex of the file name to retrieve.
Returns
The number of characters in the file name.
Remarks
Required Library: mdlbltin.lib
Int32 mdlDataObject_getDragFileCount ( GuiDataObject pDataObject)

Retrieves the number of files listed in an CF_HDROP data object.

Parameters
[in]pDataObjectThe GuiDataObject from which to get the number of files listed.
Returns
The number of files.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlDataObject_getFormat ( UInt32 pCfFormat,
GuiDataObject pDataObject,
Int32  iIndex 
)

Retrieves the format at a particular index in the GuiDataObject.

Parameters
[in]pCfFormatReceives the clipboard format.
[in]pDataObjectThe GuiDataObject from which to get the number of files listed.
[in]iIndexIndex of the clipboard format to retrieve.
Returns
SUCCESS if the clipboard format could be retrieved, or ERROR if it could not.
Remarks
Required Library: mdlbltin.lib
Int32 mdlDataObject_getFormatCount ( GuiDataObject pDataObject)

Retrieves the number of clipboard formats in the GuiDataObject.

Parameters
[in]pDataObjectThe GuiDataObject from which to get the number of clipboard formats.
Returns
The number of clipboard formats.
Remarks
Required Library: mdlbltin.lib
struct IDataObject* mdlDataObject_getIDataObject ( GuiDataObject pDataObject)

Retrieves the Windows IDataObject interface pointer.

Parameters
[in]pDataObjectThe GuiDataObject from which to get the IDataObject pointer.
Returns
The IDataObject pointer.
Remarks
Required Library: mdlbltin.lib
bool mdlDataObject_isFormatAvailable ( GuiDataObject pDataObject,
UInt32  cfFormat 
)

Determines whether a particular clipboard format is associated with the GuiDataObject.

Parameters
[in]pDataObjectThe GuiDataObject to query for a format.
[in]cfFormatA pre-defined or registered Clipboard format. Use mdlClipboard_registerClipboardFormat to register your own Clipboard formats.
Returns
true if the format is available in the GuiDataObject, or false if not.
Remarks
Required Library: mdlbltin.lib
GuiDragDropStatus mdlWindow_dragDropDo ( MSWindowP  gwP,
DialogItem diP,
GuiDataObject pDataObject,
UInt32  ulEffectsAllowed 
)

Starts a Drag & Drop operation.

Parameters
[in]gwPwindow acting as the drop source
[in]diPThe source Dialog Item (NULL if gwP is not a Dialog)
[in]pDataObjectThe data object to be dropped
[in]ulEffectsAllowedA list of effects allowed from the GUIDROPEFFECT_* list
Returns
A value from the GuiDragDropStatus enum: GuiDragDropStatus::OK - Drop operation should occur GuiDragDropStatus::Cancel - The drag was cancelled and drop should not occur GuiDragDropStatus::Error - An unknown error occurred during the drag process
Remarks
Required Library: mdlbltin.lib
void mdlWindow_dragDropHasTarget ( MSWindowP  gwP,
bool  bHasTarget 
)

Sets/clears a window's "has a drop target" flag.

Parameters
[in]gwPwindow whose drop target flag is being set
[in]bHasTargettrue if the window has a drop target area
Remarks
Required Library: mdlbltin.lib
GuiDragDropStatus mdlWindow_dragDropRegister ( MSWindowP  gwP)

Registers a window as a possible drop target.

Parameters
[in]gwPwindow being registered as the drop target
Returns
GuiDragDropStatus::OK, or another status from GuiDragDropStatus.
Remarks
Required Library: mdlbltin.lib
GuiDragDropStatus mdlWindow_dragDropRevoke ( MSWindowP  gwP)

Unregisters/revokes a window as a possible drop target.

Parameters
[in]gwPwindow being revoked as the drop target
Returns
GuiDragDropStatus::OK, or another status from GuiDragDropStatus.
Remarks
Required Library: mdlbltin.lib

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.