Posts: 151
Threads: 90
Joined: Aug 2014
Hello
Always appreciate the help.
For example:
A: control panel
B: dialog.exe
dialog.exe as windows in control panel dialog output ?
Attached Files
Image(s)
Posts: 12,071
Threads: 140
Joined: Dec 2002
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
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