Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Solved)...Creating A Dialog with output window
#1

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 )
Code:
Copy      Help
\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
#2

This seems to work but once it hits the bottom of the ID it's not scrolling down.

Code:
Copy      Help
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 )
Code:
Copy      Help
\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
#3
Use EM_REPLACESEL message. Documented in MSDN library. Also search for EM_REPLACESEL here.
#4

Thank you very much, I guess I just didnt look hard enough :oops: .


Forum Jump:


Users browsing this thread: 1 Guest(s)