Monkfish
Full Member
member is offline


Gender: 
Posts: 104
|
 |
Re: Long text input?
« Reply #10 on: Feb 12th, 2015, 7:20pm » |
|
Thanks for the pointers  This now seems to work...
text$="" WindowWidth=400 WindowHeight=200 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2) textbox #main.tbx, 10, 10, 330, 150 stylebits #main.tbx, _WS_VSCROLL OR _ES_MULTILINE, _ES_AUTOHSCROLL, 0, 0 button #main, " OK ", [accept], UL, 345, 72 open "Edit the text and then press OK" for Dialog as #main print #main, "trapclose [ignore]" print #main, "font courier_new 12 bold" print #main.tbx, sampletext$ pos=len(sampletext$) hTextbox=hWnd(#main.tbx) CallDLL #user32, "SendMessageA", hTextbox as Ulong, _EM_SETSEL as Long, pos as Long, pos as Long, result as Long wait
[accept] flg=1 print #main.tbx, "!contents? text$" close #main end
[ignore] flg=0 close #main end
|