
I need your help to dissolve two similar problems:
1. I read from a text file to a database by a fread() operation. The content of the every record should be shown in the window without
building a new window after every record (preventing a flickering window)
2. I want to show the result of a GET cvar VALID {||udfcontent(cvar)} operation in my existing window without rebuilding this window
Code: Select all
#include "dcdialog.ch"
proc main
cvar="0"
cvar2="Content may be changed by udfcontent()"
GetList := {}
@ 10,5 DCSAY "Only for demonstration"
@ 12,5 DCSAY "This is my parent window, which should not disappear during counting to 100 "
// The next line should be displayed in a child window without hiding the parent window
for x= 1 to 100
@ 14,5 DCSAY "Just count to hundred "+ str(x) // here should be shown the content of a fread() operation or
// reading from a database from top to eof() in a child window like 1,2 ..
next
// end of the child window
//...
//...
@ 16,5 DCSAY cvar2
// the content of cvar2 should be changed by the function udfcontent and be displayed in the parent window
@ 18,5 DCSAY "Show me the content of the function" get cvar valid {||udfcontent(cvar),DC_GetRefresh(GetList)}
ctitle=""
DCREAD GUI FIT ADDBUTTONS
//
return
function udfcontent
parameters cvar1
if cvar1="1"
cvar2="Content changed to 1"
else
cvar2="Content changed to 2"
endif
@ 16,5 DCSAY cvar2
return (cvar1)