Solved

CBindstatusCallback/OnProgress problems

Posted on 1998-07-28
2
238 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
ID: 1168833
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
ID: 1168834
Since you mentioned CBindStatusCallback in the question title, you must be using ATL. The above answer still applies.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

911 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

20 Experts available now in Live!

Get 1:1 Help Now