guides:programming:programmers_reference_manual:getdragdata_message

GETDRAGDATA message

This message is used to extract data of a specified format from a dragged data object. It may be used against both the drag source and drop target controls in all drag-drop related events

dragData = Send_Message(ctrlEntId,"GETDRAGDATA",format,unicode,maxlen)

The function has the following parameters:

ParameterDescription
ctrlEntIDMust be a current drag source or drop target control.
formatName of the format you want to extract. This can be a custom format or one of the following standard OpenInsight data formats.

Format Description
TEXT - Returns dragged textual data and automatically handles any Unicode translations required
FILENAME - Returns a dragged filename.
BITMAP - Returns a dragged bitmap handle. See notes below regarding dragged bitmap handles for further information.
unicodeWhen using a custom textual format, set this flag to true for OpenInsight to perform a Unicode to UTF8/ANSI translation automatically if you know the data is Unicode string.
maxlenWhen using a custom format and extracting bindary data set this to the maximum number of bytes that OpenInsight should extract.

The dragged data for the specified format.

When extracting BITMAP data, OpenInsight returns a handle to the bitmap. This is actually a copy of the bitmap that is being dragged so YOU are responsible for deleting it when you no longer need it. You may do this with the DeleteObject() Windows API function.

DRAGSOURCE property, DROPTARGET property, CLEARDRAGDATA message, REMOVEDRAGDATA message, SETDRAGDATA message

* Change the "TEXT" data being dragged

dragSource = Get_Property("SYSTEM","DRAGSOURCE")

data = Send_Message(dragSource,"GETDRAGDATA","TEXT","","")

if data _eqc 'Woodrow Wilson' then

newData = "Theodore Roosevelt"

   data = Send_Message(dragSource,"SETDRAGDATA","TEXT","","",newData)

end
  • guides/programming/programmers_reference_manual/getdragdata_message.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1