Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

CBindstatusCallback/OnProgress problems

I using the method HRESULT OnStartBinding( DWORD dwReserved, IBinding* pBinding );

to start an async download.  The class I am using has a progress control as one of its members, so that the handler OnProgress should allow for updating of the control to show current status of a particular download.

My problem is the progress bar never seems to update.  It is either empty, or when the download completes, I have to manually set it to complete.  So there is no movement.  The OnProgress handler seems always to return 0 (I'm assuming), although it is periodically activated.

Why could this be?  Is there something else that I need to register?

REgards

Oscar
0
ossentoo
Asked:
ossentoo
  • 2
1 Solution
 
chensuCommented:
If you are using MFC:

Assume your progress bar is m_progress, call the following functions each time you want to update the status.
m_progress.Invalidate();
m_progress.UpdateWindow();

If you are not using MFC:

Assume the handle of your progress bar is hProgress, call the following functions each time you want to update the status.
InvalidateRect(hProgress, NULL, TRUE);
UpdateWindow(hProgress);

0
 
chensuCommented:
Since you mentioned CBindStatusCallback in the question title, you must be using ATL. The above answer still applies.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now