Udostępnij za pośrednictwem


CProgressCtrl::SetBkColor

Sets the background color for the progress bar.

COLORREF SetBkColor( 
   COLORREF clrNew  
);

Parameters

  • clrNew
    A COLORREF value that specifies the new background color. Specify the CLR_DEFAULT value to use the default background color for the progress bar.

Return Value

The COLORREF value indicating the previous background color, or CLR_DEFAULT if the background color is the default color.

Example

CProgressCtrl myCtrl;

// Create a smooth child progress control.
myCtrl.Create(WS_CHILD|WS_VISIBLE|PBS_SMOOTH, CRect(10,10,200,30), 
   pParentWnd, IDC_PROGRESSCTRL);

// Set the background color to red.
myCtrl.SetBkColor(RGB(255, 0, 0));   

Requirements

Header: afxcmn.h

See Also

Reference

CProgressCtrl Class

Hierarchy Chart

PBM_SETBKCOLOR

Other Resources

CProgressCtrl Members