How do I update a progress bar?

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

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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


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!

Leave a Comment

Please sign in to add a comment. Not a member? Join today