Solved

CBindstatusCallback/OnProgress problems

Posted on 1998-07-28
2
229 Views
Last Modified: 2010-05-18
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
Comment
Question by:ossentoo
  • 2
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
Comment Utility
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
 
LVL 23

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now