Solved

CBindstatusCallback/OnProgress problems

Posted on 1998-07-28
2
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C Language combined operators 28 123
Problem with SqlConnection 4 184
c++ reading data from file into two dimensional array 3 132
Where are the c++ header files to use in Eclipse? 4 52
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 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…

733 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