Solved

Change the 'progress' color of a CProgressCtrl.

Posted on 1998-08-26
1
321 Views
Last Modified: 2013-11-19
Can anyone tell me how to change the 'progress' color of a CProgressCtrl.  The doc says that it is displayed as the system highlight color but changing that seems risky.  (lol)

Zerb.

0
Comment
Question by:TXTX
[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
1 Comment
 
LVL 2

Accepted Solution

by:
prasanth earned 100 total points
ID: 1321322
You need to get the latest version of the progress control from
http://msdn.microsoft.com/developer/downloads/files/40Comupd.htm and send a PBM_SETBARCOLOR message to it. The lParam is the COLORREF to use.

#define PBM_SETBARCOLOR         (WM_USER+9)

// for a red progress bar
SendMessage(hwndProgress, PBM_SETBARCOLOR, 0, RGB(255, 0, 0));

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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