Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"dialog.exe" program output in the dialog window?
#1
Hello Big Grin
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)
   
#2
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
Code:
Copy      Help
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
Code:
Copy      Help
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


Forum Jump:


Users browsing this thread: 1 Guest(s)