Sunday, April 19, 2009

[VC++] Change color of Progress bar

Have you ever thought of changing the color of the progress bar you created using CProgressCtrl? PBM_SETBARCOLOR is the message which will help you to change the color of progress bar. See the below code snippet showing how to send the above said message for changing the progress bar color.
// Change progress bar color to yellow
m_ProgressCtrl.SendMessage( PBM_SETBARCOLOR, 0, RGB ( 255, 255, 0 ));

No comments: