Solved

CBindstatusCallback/OnProgress problems

Posted on 1998-07-28
2
251 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

773 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