SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Determines if a specified clipboard format is supported by the DataObject object.
| VB.NET | FormatSupported = object.GetFormat(ByVal Format As Short) As Boolean |
| VB | FormatSupported = object.GetFormat(ByVal Format As Integer) As Boolean |
| C#.NET | bool FormatSupported = object.GetFormat(short Format); |
| VC++ | VARIANT_BOOL FormatSupported = object->GetFormat(short Format); |
| C | HRESULT object->raw_GetFormat(short Format, VARIANT_BOOL* FormatSupported); |
object
Format
The data format requested.
| Format | Value | Description |
|---|---|---|
| sftCFText | 1 | Text |
| sftCFBitmap | 2 | Bitmap |
| sftCFMetafile | 3 | Metafile |
| sftCFDIB | 8 | Device independent bitmap |
| sftCFFiles | 15 | List of files |
| sftCFRTF | -16639 | Rich text format |
FormatSupported
Returns True if the specified clipboard format Format is supported by the DataObject object, otherwise False is returned.
The GetFormat method determines if a specified clipboard format is supported by the DataObject object.
The GetFormat method returns True if a data format in the DataObject object matches the specified format. Otherwise, it returns False.
AxSftMask1.Mask = ""
AxSftMask1.MaxLength = 300
AxSftMask1.PromptUnderline = False
AxSftMask1.OLEDropMode = SftMaskOLEDropModeConstants.OLEDropSftMaskManual
End Sub
Private Sub AxAxSftMask1_OLEDragDrop(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEDragDropEvent) Handles AxSftMask1.OLEDragDrop
Dim S As String
If e.data.GetFormat(SftOLEClipboardConstants.sftCFText) Then
S = e.data.GetData(SftOLEClipboardConstants.sftCFText)
AxSftMask1.SelStart = e.targetChar
AxSftMask1.SelText = S
Else
e.effect = 0 ' vbDropEffectNone
End If
End Sub
SftMask1.Mask = ""
SftMask1.MaxLength = 300
SftMask1.PromptUnderline = False
SftMask1.OLEDropMode = OLEDropSftMaskManual
End Sub
Private Sub SftMask1_OLEDragDrop(Data As SftMaskLib70.DataObject, TargetChar As Long, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
Dim S As String
If Data.GetFormat(sftCFText) Then
S = Data.GetData(sftCFText)
SftMask1.SelStart = TargetChar
SftMask1.SelText = S
Else
Effect = vbDropEffectNone
End If
End Sub
axSftMask1.MaxLength = 300;
axSftMask1.PromptUnderline = false;
axSftMask1.OLEDropMode = SftMaskOLEDropModeConstants.OLEDropSftMaskManual;
}
private void axSftMask1_OLEDragDrop(object sender, AxSftMaskLib70._ISftMaskEvents_OLEDragDropEvent e)
{
string s;
if (e.data.GetFormat((short) SftOLEClipboardConstants.sftCFText)) {
s = (string) e.data.GetData(SftOLEClipboardConstants.sftCFText);
axSftMask1.SelStart = e.targetChar;
axSftMask1.SelText = s;
} else {
e.effect = 0; //vbDropEffectNone
}
}
return TRUE;
}
void CProject1Dlg::OnOLEDragDropSftMask1(LPDISPATCH FAR* Data, long FAR* TargetChar, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y)
{
IVDMDataObjectPtr pData = *Data;
if (pData->GetFormat(sftCFText) != VARIANT_FALSE) {
_variant_t data = pData->GetData(_variant_t((long) sftCFText));
data.ChangeType(VT_BSTR);
m_pMask1->SelStart = *TargetChar;
m_pMask1->SelText = data.bstrVal;
} else
*Effect = DROPEFFECT_NONE;
}
See Also DataObject Object | Object Hierarchy
