Posts: 331
Threads: 60
Joined: May 2006
How would I add new lines to ID 3, something like how the Output window in QM works.
P.S I would like for the Edit ID to scroll down once the 'out' reaches the bottom of the ID(once again like the Output in QM).
Function ( Dialog2 )
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
int hH wH
;BEGIN DIALOG
;0 "" 0x90CE0A44 0x180 0 0 220 174 "Dialog"
;3 Edit 0x540809C4 0x200 64 54 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""
str controls = "3"
str e3
if(!ShowDialog("Dialog2" &Dialog2 &controls)) ret
ret
;messages
sel message
,case [WM_INITDIALOG,WM_SIZE];GetWinXY hDlg 0 0 hH wH;MoveWindow (id(3 hDlg)) 0 0 hH wH 1
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Posts: 331
Threads: 60
Joined: May 2006
This seems to work but once it hits the bottom of the ID it's not scrolling down.
str TempC.getwintext(id(3 win("Dialog" "#32770")))
str Cout
Cout.formata("%s HI THERE[]" TempC)
Cout.setwintext(id(3 win("Dialog" "#32770")))
Function ( Dialog2 )
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
int L T H W hH wH
;BEGIN DIALOG
;0 "" 0x90CE0A44 0x180 0 0 100 140 "Dialog"
;3 Edit 0x54230844 0x20000 64 54 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x202000B "" ""
str controls = "3"
str e3
if(!ShowDialog("Dialog2" &Dialog2 &controls)) ret
ret
;messages
sel message
,case [WM_INITDIALOG,WM_SIZE,WM_MOVE]
,GetWinXY hDlg 0 0 hH wH;MoveWindow (id(3 hDlg)) 0 0 hH-9 wH-25 1
,GetWorkArea L T W H;MoveWindow hDlg W-hH 0 hH H-25 1
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Posts: 12,073
Threads: 140
Joined: Dec 2002
Use EM_REPLACESEL message. Documented in MSDN library. Also search for EM_REPLACESEL here.
Posts: 331
Threads: 60
Joined: May 2006
Thank you very much, I guess I just didnt look hard enough :oops: .