11-26-2015, 09:13 AM
You can use an edit or rich edit control in your "control panel" dialog, and let your dialog append text to it.
Or you can use function ExeOutputWindow.
Simple example:
Function Dialog196
Full example:
Function Dialog194
Or you can use function ExeOutputWindow.
Simple example:
Function Dialog196
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 8 8 48 14 "out test"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040304 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,ExeOutputWindow 0 "control panel"
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 out "test"
ret 1
Full example:
Function Dialog194
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 8 8 48 14 "out test"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040304 "*" "" "" ""
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,int hwndCP=sub.Dialog2
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 out "test"
ret 1
#sub Dialog2
function# [hwndOwner]
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 396 238 "control panel"
;1 Button 0x54030001 0x4 4 220 48 14 "OK"
;2 Button 0x54030000 0x4 56 220 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040304 "*" "" "" ""
ret ShowDialog(dd &sub.DlgProc2 0 hwndOwner 1)
#sub DlgProc2
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,ExeOutputWindow
,int ho=___eow_hwnd
,SetParent ho hDlg
,SetWinStyle ho WS_CHILD|WS_VISIBLE
,MoveWindow ho 0 100 200 200 1
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1