示例#1
0
VOID CDUIProgressBarBase::PaintForgnd(HDC dc)
{
	RECT rtContent = GetContentRect();
	
	CRefPtr<CImageList> pImage = m_uiData.m_imageBK;
	if(!pImage.IsNull() 
		&& !pImage->IsNull() 
		&& pImage->GetItemCount() >= PROCRSS_BAR_IMAGE_COUNT)
	{
		RECT rtTemp = {0};
		GetProgressRect(rtContent, rtTemp);
		if(!IsRectEmpty(&rtTemp))
		{
			CDUIRenderClip clip2(dc, rtTemp);
			if(IsVertical())
			{
				pImage->VerticalStretch(dc, rtContent, PROCRSS_BAR_IMAGE_FORE);
			}
			else
			{
				pImage->HorizontalStretch(dc, rtContent, PROCRSS_BAR_IMAGE_FORE);
			}
		}
	}
	else
	{
		DUI_ASSERT(FALSE);
	}
}
示例#2
0
VOID CDUIProgressBarBase::PaintBkgnd(HDC dc)
{
	RECT rtContent = GetContentRect();
	
	CRefPtr<CImageList> pImage = m_uiData.m_imageBK;
	if(!pImage.IsNull() 
		&& !pImage->IsNull() 
		&& pImage->GetItemCount() >= PROCRSS_BAR_IMAGE_COUNT)
	{
		if(IsVertical())
		{
			pImage->VerticalStretch(dc, rtContent, PROCRSS_BAR_IMAGE_BK);
		}
		else
		{
			pImage->HorizontalStretch(dc, rtContent, PROCRSS_BAR_IMAGE_BK);
		}
	}
	else
	{
		DUI_ASSERT(FALSE);
	}
}