Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves the background color of the current pager control.
COLORREF GetBkColor() const;
Requirements
Header: afxcmn.h
Return Value
A COLORREF value that contains the current background color of the pager control.
Remarks
This method sends the PGM_GETBKCOLOR message, which is described in the Windows SDK.
Example
The following example uses the CPagerCtrl::SetBkColor method to set the background color of the pager control to red, and the CPagerCtrl::GetBkColor method to confirm that the change was made.
void CCSplitButton_s2Dlg::OnXColor()
{
COLORREF originalColor;
// Set color to red.
originalColor = m_pager.SetBkColor(RGB(255,0,0));
if (m_pager.GetBkColor() != RGB(255,0,0))
{
MessageBox(_T("Control did not return RED as the previous color."));
}
// The following statement is one way to restore the color.
// m_pager.SetBkColor( originalColor );
}