?
Solved

Change the 'progress' color of a CProgressCtrl.

Posted on 1998-08-26
1
Medium Priority
?
332 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

801 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