?
Solved

Change the 'progress' color of a CProgressCtrl.

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

649 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