void CXTPSplitterWndThemeResource::RefreshMetrics()
{
	CXTPResourceImages* pImages = XTPResourceImages();
	if (pImages)
	{
		// get colors from resource.
		COLORREF crBack = pImages->GetImageColor(_T("Window"), m_bTabColors ? _T("SplitterFaceTab") : _T("SplitterFace"), GetXtremeColor(COLOR_3DFACE));
		COLORREF crBorder = pImages->GetImageColor(_T("Window"), m_bTabColors ? _T("SplitterFrameTab") : _T("SplitterFrame"), GetXtremeColor(COLOR_3DSHADOW));

		// set splitter colors.
		m_crBack.SetStandardValue(crBack);
		m_crOuterBorder.SetStandardValue(crBack);
		m_crInnerBorder.SetStandardValue(crBorder);

		// set split box colors.
		m_crBoxBack = m_crBack;
		m_crOuterBoxBorder = m_crOuterBorder;
		m_crInnerBoxBorder = m_crInnerBorder;
	}
	else
	{
		CXTPSplitterWndThemeOfficeXP::RefreshMetrics();
	}
}
void CXTPHeaderCtrlThemeResource::RefreshMetrics(CXTPHeaderCtrl* pHeader)
{
	CXTPHeaderCtrlThemeOfficeXP::RefreshMetrics(pHeader);

	CXTPResourceImages* pImages = XTPResourceImages();
	if (pImages)
	{
		m_crText = pImages->GetImageColor(_T("ReportControl"), _T("HeaderText"), m_crText);
		m_cr3DShadow = pImages->GetImageColor(_T("ReportControl"), _T("ColumnSeparator"), m_crText);
		m_cr3DDkShadow = pImages->GetImageColor(_T("ReportControl"), _T("ColumnShadow"), m_crText);

		m_crgBack.SetStandardValue(
			pImages->GetImageColor(_T("ReportControl"), _T("NormalColumnLight"), m_cr3DFace),
			pImages->GetImageColor(_T("ReportControl"), _T("NormalColumnDark"),  m_cr3DFace));

		m_crgBackPressed.SetStandardValue(
			pImages->GetImageColor(_T("ReportControl"), _T("PressedColumnLight"), m_cr3DFace),
			pImages->GetImageColor(_T("ReportControl"), _T("PressedColumnDark"),  m_cr3DFace));
	}
	else
	{
		m_crgBack.SetStandardValue(m_cr3DFace, m_cr3DFace);
	}
}
void CXTPPopupThemeResource::RefreshMetrics()
{
	CXTPPopupThemeOffice2003::RefreshMetrics();

	CXTPResourceImages* pImages = XTPResourceImages();

	m_clrBackground.SetStandardValue(
		pImages->GetImageColor(_T("PopupControl"), _T("BackgroundLight")),
		pImages->GetImageColor(_T("PopupControl"), _T("BackgroundDark")));
	m_clrGripper.SetStandardValue(
		pImages->GetImageColor(_T("PopupControl"), _T("CaptionLight")),
		pImages->GetImageColor(_T("PopupControl"), _T("CaptionDark")));
	m_clrFrame.SetStandardValue(
		pImages->GetImageColor(_T("PopupControl"), _T("FrameBorder")));

	m_clrText = pImages->GetImageColor(_T("PopupControl"), _T("NormalText"));
	m_clrButtonSelected = pImages->GetImageColor(_T("PopupControl"), _T("ButtonSelected"));
	m_clrButtonPressed = pImages->GetImageColor(_T("PopupControl"), _T("ButtonPressed"));
	m_clrButtonPressedBorder.SetStandardValue(pImages->GetImageColor(_T("PopupControl"), _T("ButtonBorder")));
	m_clrButtonSelectedBorder.SetStandardValue(pImages->GetImageColor(_T("PopupControl"), _T("ButtonBorder")));
}