meta data for this page
Dies ist eine alte Version des Dokuments!
EDIT
zur allgemeinen Verwendung s. die Beschreibung zum Dialogeditor
Enthält das EDIT-Control bereits Text und soll weiterer Text an der Cursorposition eingefügt werden, ist dies mit der folgenden Prozedur möglich.
VBScript
'Fügt Text in ein Textfeld an Cursorposition ein
Sub InsertInTextBox(sDlg, sControl, sText)
Const EM_GETSEL = &H00B0
Dim lPos
Dim lSelStart
Dim lSelEnd
Dim sControlText
lPos = CLng(FF_SendControl(sDlg, sControl, EM_GETSEL, 0, 0))
lSelStart = lPos And &HFFFF&
lSelEnd = (lPos \ &HFFFF&)
sControlText = FF_GetControl(sDlg, sControl)
FF_SetControl sDlg, sControl, Left(sControlText, lSelStart) & sText & Mid(sControlText, lSelEnd + 1)
End Sub