Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hbell
Beginner
65 Views

How do I update a progress bar?

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
65 Views

Did you try calling DLGFLUSH after the progress bar's DlgSet?

hth,
John
hbell
Beginner
65 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!
Reply