CReBarCtrl::GetPalette

Retrieves the rebar control's current palette.

CPalette* GetPalette( ) const;

Return Value

A pointer to a CPalette object specifying the rebar control's current palette.

Remarks

Note that this member function uses a CPalette object as its return value, rather than an HPALETTE.

Example

CPalette* pPalette = m_wndReBar.GetReBarCtrl().GetPalette();
if (pPalette)
{
   int nEntries = pPalette->GetEntryCount();
   CString msg;
   msg.Format(_T("Number of palette entries: %d"), nEntries);
   AfxMessageBox(msg);
}
else
{
   AfxMessageBox(_T("No palette!"));   
}

Requirements

Header: afxcmn.h

See Also

Reference

CReBarCtrl Class

Hierarchy Chart

CReBarCtrl::SetPalette

Other Resources

CReBarCtrl Members