02-29-2016, 05:01 AM
In a dialog with a multi-line inputfield with a button get selected text,When I try to get the selected text by pressing a button within that same dialog, the text get's de-selected as soon the focus is lost on the mult-line inputfield.
Is there a way to get the selected text?
EDIT: I tried to grab the selected text (getsel and setclip) on "case EN_KILLFOCUS<<16|5" , but it doesn't work either.
Below the dialog example:
Function ErrMsgFull2
Is there a way to get the selected text?
EDIT: I tried to grab the selected text (getsel and setclip) on "case EN_KILLFOCUS<<16|5" , but it doesn't work either.
Below the dialog example:
Function ErrMsgFull2
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 404 178 "Dialog"
;6 Button 0x54032000 0x0 4 160 158 14 "Open/Run selected"
;7 Static 0x54000000 0x0 50 6 308 44 ""
;5 Edit 0x54231044 0x200 4 56 398 98 ""
;1 Button 0x54030001 0x4 352 160 48 14 "Close"
;END DIALOG
;DIALOG EDITOR: "" 0x2040308 "*" "" "" ""
str controls = "5"
str e5
e5="d:\____TEMP\[]www.google.com"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 6
,,str getsel_txt.getsel
,,getsel_txt.trim
,,out getsel_txt
,case IDOK
,case IDCANCEL
ret 1