Пример #1
0
void CTabItem_MainTabBn::DrawInactiveBk(CDC* pDC, const CRect &rect)
{
	CRect	rtFrm;
	CRect	rtFace;

	rtFrm = rect;
	rtFace = rect;

	{
		CPenDC	penOutSide(pDC->GetSafeHdc(), RGB(171, 164, 150));

		rtFace.top += 3;
		Draw2GradLayerRect(pDC->GetSafeHdc(), rtFace, RGB(255, 255, 255), RGB(239, 238, 234), RGB(226, 223, 215), RGB(242, 241, 235), 62);
		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}

	{
		CPenDC	penInSide(pDC->GetSafeHdc(), RGB(255, 255, 255), 2);

		rtFrm.left += 2;
		rtFrm.top += 2;
		rtFrm.right -= 1;
		rtFrm.bottom -= 2;

		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}
}
Пример #2
0
void CTabItem_MainTabBn::DrawHover(CDC* pDC, const CRect &rect)
{
	CRect	rtFrm;
	CRect	rtFace;

	rtFrm = rect;
	rtFace = rect;

	{
		CPenDC	penOutSide(pDC->GetSafeHdc(), RGB(126, 165, 250));

		rtFace.top += 3;
		Draw2GradLayerRect(pDC->GetSafeHdc(), rtFace, RGB(255, 255, 255), RGB(228, 236, 254), RGB(205, 221, 253), RGB(240, 246, 255), 62);
		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}

	{
		CPenDC	penInSide(pDC->GetSafeHdc(), RGB(255, 255, 255), 2);

		rtFrm.left += 2;
		rtFrm.top += 2;
		rtFrm.right -= 1;
		rtFrm.bottom -= 2;

		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}
}
Пример #3
0
void CTabItem_MainTabBn::DrawActiveBk(CDC* pDC, const CRect &rect)
{
	CRect	rtFrm;
	CRect	rtFace;

	rtFrm = rect;
	rtFace = rect;

	{
		CPenDC	penOutSide(pDC->GetSafeHdc(), RGB(110, 150, 199));

		rtFace.top += 3;
		Draw2GradLayerRect(pDC->GetSafeHdc(), rtFace, RGB(239, 243, 249), RGB(220, 229, 241), RGB(187, 206, 229), RGB(255, 255, 255), 62);
		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}

	{
		CPenDC	penInSide(pDC->GetSafeHdc(), RGB(255, 255, 255), 2);

		rtFrm.left += 2;
		rtFrm.top += 2;
		rtFrm.right -= 1;
		rtFrm.bottom -= 2;

		DrawRound(pDC->GetSafeHdc(), rtFrm, 3);
	}
}
Пример #4
0
void CTabItem_Normal::DrawItem(CDC* pDC, const CRect &rect, COLORREF clrFrmOutside, COLORREF clrFrmInside, COLORREF clrLayers[4])
{
	CRect	rtFrm;
	CRect	rtFace;

	rtFrm = rect;
	rtFace = rect;

	switch (GetBarPos())
	{
	case TBP_TOP:
	default:
		rtFace.top += 2;
		Draw2GradLayerRect(pDC->GetSafeHdc(), rtFace, clrLayers[0], clrLayers[1], clrLayers[2], clrLayers[3], 62);
		break;
	case TBP_BOTTOM:
		rtFace.bottom -= 2;
		Draw2GradLayerRect(pDC->GetSafeHdc(), rtFace, clrLayers[0], clrLayers[1], clrLayers[2], clrLayers[3], 62);
		break;
	}



	{
		CPenDC	penInSide(pDC->GetSafeHdc(), clrFrmInside, 1);

		switch (GetBarPos())
		{
		case TBP_TOP:
		default:
			rtFrm.left += 1;
			rtFrm.right -= 1;
			rtFrm.top += 1;

			DrawRound(pDC->GetSafeHdc(), rtFrm, 3, 2);
			//Draw3Borders(pDC->GetSafeHdc(), rtFrm, 3);
			break;
		case TBP_BOTTOM:
			rtFrm.left += 1;
			rtFrm.right -= 1;
			rtFrm.bottom -= 1;
			DrawRound(pDC->GetSafeHdc(), rtFrm, 1, 2);
			//Draw3Borders(pDC->GetSafeHdc(), rtFrm, 1);
			break;
		}
	}

	{
		CPenDC	penOutSide(pDC->GetSafeHdc(), clrFrmOutside);

		switch (GetBarPos())
		{
		case TBP_TOP:
		default:
			DrawRound(pDC->GetSafeHdc(), rect, 3, 3);
			//Draw3Borders(pDC->GetSafeHdc(), rtFrm, 3);
			break;
		case TBP_BOTTOM:
			DrawRound(pDC->GetSafeHdc(), rect, 1, 3);
			//Draw3Borders(pDC->GetSafeHdc(), rect, 1);
			break;
		}
	}

}