Software Archive
Read-only legacy content
17061 Discussions

How do I update a progress bar?

hbell
Beginner
300 Views
I am having trouble updating a progress bar in CVF 6.5. I can get the
initial bar set up but once I make the call, ret = DlgModal (dlg) , I
cannot adjust the position in another subroutine even though I am passing
the dialog variable, dlg, and all other modules and include files seem to be
in order. Following is the code fragment:

subroutine A
...
(this all works)
lret = DlgSet(dlg, IDC_PROGRESS1, .TRUE., DLG_ENABLE)
lret = DlgSet(dlg, IDC_PROGRESS1, 0 , DLG_RANGEMIN)
lret = DlgSet(dlg, IDC_PROGRESS1, 100 , DLG_RANGEMAX)
lret = DlgSet(dlg, IDC_PROGRESS1, 10 , DLG_POSITION )
lret = DlgSetSub(dlg,IDM_APPLY2, updateApply)
ret = DlgModal(dlg)
...
end subroutine A

(this subroutine occurs after the above fragment):
subroutine B
...
(and this does not show up)
lret = DlgSet(dlg, IDC_PROGRESS1, 50 , DLG_POSITION )
...
end subroutine A
0 Kudos
2 Replies
Intel_C_Intel
Employee
300 Views
Did you try calling DLGFLUSH after the progress bar's DlgSet?

hth,
John
0 Kudos
hbell
Beginner
300 Views
John Termine had the answer to this problem. Apparently the only way to update dialog controls that are not updated via callback subroutine is by inserting a DLGFLUSH call after the DLGSET function. Thanks John!
0 Kudos
Reply