|
|
|
|
|
DnDCacheData (Function) In french: DnDDonne
Not available
Indicates the type of data and the data to copy/move during Drag/Drop. Remarks: - DnDCacheData must be used during the call to the dndBeginDrag event (DnDEvent).
- DnDCacheData can be used several times with different formats to copy different types of data from the source.
PROCEDURE DébutGlisser()
DnDCacheData(CF_TEXT, SAI_Saisie.Valeur)
PROCEDURE DNDVersExplorateur(sListeCheminFichier)
POINT is Structure
x, y are int
END
DROPFILES is Structure
pFiles is int
PT is POINT
fNC is boolean
fWide is boolean
END
stDROPFILES is DROPFILES
stDROPFILES:fWide = True
stDROPFILES:fNC = True
stDROPFILES:PT:x = 0
stDROPFILES:PT:y = 0
stDROPFILES:pFiles = Dimension(stDROPFILES)
bufListeDeFichiers is Buffer
IF TypeVar(sListeCheminFichier) = wlUnicodeString THEN
bufListeDeFichiers = Replace(sListeCheminFichier, CR, ...
CharactUnicode(0)) + CharactUnicode(0) + CharactUnicode(0)
stDROPFILES:fWide = True
ELSE
bufListeDeFichiers = Replace(sListeCheminFichier, CR, ...
Charact(0)) + Charact(0) + Charact(0)
stDROPFILES:fWide = False
END
nTaille is int
nTaille = Dimension(stDROPFILES) + Length(bufListeDeFichiers)
bufDonneesDrop is Buffer
bufDonneesDrop = RepeatString(Charact(0), nTaille)
Transfer(&bufDonneesDrop, &stDROPFILES, Dimension(stDROPFILES))
Transfer(&bufDonneesDrop + Dimension(stDROPFILES), ...
&bufListeDeFichiers, Length(bufListeDeFichiers))
DnDCacheData(CF_HDROP, &bufDonneesDrop, nTaille)
Syntax
Drag and Drop between WINDEV applications Hide the details
DnDCacheData(<Type of data> , <Data> [, <Size>])
<Type of data>: Integer or character string Type of data copied/moved.- Preset data types:
Only some types of data are presented below. For more details, see the Microsoft documentation ("Standard Clipboard Formats").
| | | CF_BITMAP | 2 | .BMP (bitmap image) | CF_DIB | 8 | .DIB (bitmap independent from the device managers) | CF_DIF | 5 | Data interchange format (lotus) | CF_ENHMETAFILE | 14 | .EMF (Windows 32-bit graphic primitives ) | CF_HDROP | 15 | Format of "dropped" file (in Windows NT) | CF_LOCALE | 16 | Format local to Windows (in Windows NT) | CF_METAFILEPICT | 3 | .WMF (graphic primitive file) | CF_OEMTEXT | 7 | OEM string ending with a \0 character | CF_PALETTE | 9 | Palette (Windows standard) | CF_PENDATA | 10 | Optical pen | CF_RIFF | 11 | Audio format | CF_SYLK | 4 | .SLK, Excel, Multiplan | CF_TEXT | 1 | ANSI string ending with a \0 character | CF_TIFF | 6 | .TIF (TIFF image) | CF_UNICODETEXT | 13 | Text string with characters coded on 2 bytes (support for internationalization) | CF_WAVE | 12 | .WAV (sound data) |
- Character string:
Type of data created beforehand. For example:
Donnée1 is string = CLIENT.CLE + TAB + FACTURE.PRIX
DnDCacheData("MonType", Donnée1)
The "MyType" type will correspond to what was assigned to the "Data" string.
<Data>: Character string Data to retrieve. <Size>: Optional integer Number of bytes that will be assigned to <Data>.
Drag and Drop between a WINDEV application and a Windows application Hide the details
DnDCacheData(<Type of data> , <Pointer> [, <Size>])
<Type of data>: Integer or character string Type of data copied/moved.- Preset data types:
Only some types of data are presented below. For more details, see the Microsoft documentation ("Standard Clipboard Formats").
| | | CF_BITMAP | 2 | .BMP (bitmap image) | CF_DIB | 8 | .DIB (bitmap independent from the device managers) | CF_DIF | 5 | Data interchange format (lotus) | CF_ENHMETAFILE | 14 | .EMF (Windows 32-bit graphic primitives ) | CF_HDROP | 15 | Format of "dropped" file (in Windows NT) | CF_LOCALE | 16 | Format local to Windows (in Windows NT) | CF_METAFILEPICT | 3 | .WMF (graphic primitive file) | CF_OEMTEXT | 7 | OEM string ending with a \0 character | CF_PALETTE | 9 | Palette (Windows standard) | CF_PENDATA | 10 | Optical pen | CF_RIFF | 11 | Audio format | CF_SYLK | 4 | .SLK, Excel, Multiplan | CF_TEXT | 1 | ANSI string ending with a \0 character | CF_TIFF | 6 | .TIF (TIFF image) | CF_UNICODETEXT | 13 | Text string with characters coded on 2 bytes (support for internationalization) | CF_WAVE | 12 | .WAV (sound data) |
- Character string:
Type of data created beforehand. For example:
Donnée1 is string = CLIENT.CLE + TAB + FACTURE.PRIX
DnDCacheData("MonType", Donnée1)
The "MyType" type will correspond to what was assigned to the "Data" string.
<Pointer>: Integer Pointer to a character string, a structure, ... <Size>: Optional integer Number of bytes that will be assigned to <Pointer>. Remarks The following variables can be used: | | Variable name | Description |
---|
_DND.Action | Action specified in DnDAccept.
The various possible values are as follows: dndCopy, dndMove and dndProhibited.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.TargetControl | Name of target control.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.SourceControl | Name of source control. | _DND.CtrlDown | Status of Ctrl key:- True: Ctrl control key pressed.
- False the Ctrl control key is not pressed.
This variable is not filled at the beginning of Drag and Drop in a source control (dndBeginDrag constant) or when exiting from a target control (dndDragLeave constant). | _DND.SourceWin | Name of source window.
This variable is not filled when exiting from a target control (dndDragLeave constant). | _DND.MouseXPos | Horizontal position (X) of mouse cursor in relation to the control handled during the event.
This variable is not filled when exiting from a target control (dndDragLeave constant). | _DND.MouseYPos | Vertical position (Y) of mouse cursor in relation to the control handled during the event.
This variable is not filled when exiting from a target control (dndDragLeave constant). |
The _DND.SourceControl and _DND.SourceWin variables return an empty string ("") when the Drag and Drop comes from an application other than the current application.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|