本文整理汇总了C++中CBCGPDrawManager::FillGradient方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPDrawManager::FillGradient方法的具体用法?C++ CBCGPDrawManager::FillGradient怎么用?C++ CBCGPDrawManager::FillGradient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPDrawManager
的用法示例。
在下文中一共展示了CBCGPDrawManager::FillGradient方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dm
//*********************************************************************************************************
void CBCGPVisualManagerVS2008::OnEraseTabsArea (CDC* pDC, CRect rect,
const CBCGPBaseTabWnd* pTabWnd)
{
ASSERT_VALID (pDC);
ASSERT_VALID (pTabWnd);
if (globalData.m_nBitsPerPixel <= 8 || globalData.IsHighContastMode () ||
!pTabWnd->IsVS2005Style () ||
pTabWnd->IsDialogControl ())
{
CBCGPVisualManagerVS2005::OnEraseTabsArea (pDC, rect, pTabWnd);
return;
}
CFrameWnd* pMainFrame = BCGCBProGetTopLevelFrame (pTabWnd);
if (pMainFrame->GetSafeHwnd () != NULL)
{
CRect rectMain;
pMainFrame->GetClientRect (rectMain);
pMainFrame->MapWindowPoints ((CBCGPTabWnd*)pTabWnd, &rectMain);
rect.top = rectMain.top;
rect.left = rectMain.left;
rect.right = rect.left + globalData.m_rectVirtual.Width () + 10;
}
CBCGPDrawManager dm (*pDC);
dm.FillGradient (rect, m_clrBarGradientDark, m_clrBarGradientLight, FALSE, 0);
}
示例2: dm
//*********************************************************************************
void CBCGPVisualManagerVS2005::OnFillAutoHideButtonBackground (CDC* pDC, CRect rect, CBCGPAutoHideButton* pButton)
{
ASSERT_VALID (pDC);
ASSERT_VALID (pButton);
if (!m_bRoundedAutohideButtons)
{
return;
}
LPPOINT points;
int nPoints = CreateAutoHideButtonRegion (rect, pButton->GetAlignment (), points);
CRgn rgnClip;
rgnClip.CreatePolygonRgn (points, nPoints, WINDING);
pDC->SelectClipRgn (&rgnClip);
if (globalData.m_nBitsPerPixel <= 8 || globalData.IsHighContastMode ())
{
CBCGPVisualManager2003::OnFillAutoHideButtonBackground (pDC, rect, pButton);
}
else
{
BOOL bIsHorz =
((pButton->GetAlignment () & CBRS_ALIGN_ANY) == CBRS_ALIGN_LEFT ||
(pButton->GetAlignment () & CBRS_ALIGN_ANY) == CBRS_ALIGN_RIGHT);
CBCGPDrawManager dm (*pDC);
dm.FillGradient (rect,
m_clrBarGradientDark, m_clrBarGradientLight, !bIsHorz);
}
pDC->SelectClipRgn (NULL);
delete [] points;
}
示例3: OnFillOutlookPageButton
//*********************************************************************************
void CMacStyle::OnFillOutlookPageButton (CDC* pDC, const CRect& rect,
BOOL bIsHighlighted, BOOL bIsPressed,
COLORREF& clrText)
{
COLORREF clr1 = RGB (139, 139, 139);
COLORREF clr2 = RGB (233, 233, 233);
if (bIsPressed)
{
COLORREF clr = clr1;
clr1 = clr2;
clr2 = clr;
}
else if (bIsHighlighted)
{
clr1 = RGB (153, 153, 153);
clr2 = RGB (255, 255, 255);
}
CBCGPDrawManager dm (*pDC);
dm.FillGradient (rect, clr1, clr2, TRUE);
clrText = RGB (32, 32, 32);
}
示例4: OnDrawControlBarCaption
//**************************************************************************************
COLORREF CBCGPVisualManagerVS2005::OnDrawControlBarCaption (CDC* pDC, CBCGPDockingControlBar* pBar,
BOOL bActive, CRect rectCaption, CRect rectButtons)
{
ASSERT_VALID (pDC);
if (globalData.m_nBitsPerPixel <= 8 || globalData.IsHighContastMode ())
{
return CBCGPVisualManagerXP::OnDrawControlBarCaption (pDC, pBar,
bActive, rectCaption, rectButtons);
}
rectCaption.bottom++;
COLORREF clrFill;
if (!bActive)
{
if (m_CurrAppTheme == WinXpTheme_Blue ||
m_CurrAppTheme == WinXpTheme_Olive ||
m_CurrAppTheme == WinXpTheme_Silver)
{
clrFill = CBCGPDrawManager::PixelAlpha (m_clrBarGradientDark, 87);
CBrush brFill (clrFill);
pDC->FillRect (rectCaption, &brFill);
pDC->Draw3dRect (rectCaption, globalData.clrBarShadow, globalData.clrBarShadow);
}
else
{
CBrush brFill (globalData.clrInactiveCaption);
pDC->FillRect (rectCaption, &brFill);
return globalData.clrInactiveCaptionText;
}
}
else
{
if (m_CurrAppTheme == WinXpTheme_Blue ||
m_CurrAppTheme == WinXpTheme_Olive ||
m_CurrAppTheme == WinXpTheme_Silver)
{
COLORREF clrLight =
CBCGPDrawManager::PixelAlpha (globalData.clrHilite, 130);
CBCGPDrawManager dm (*pDC);
dm.FillGradient (rectCaption, globalData.clrHilite, clrLight, TRUE);
return globalData.clrTextHilite;
}
else
{
pDC->FillRect (rectCaption, &globalData.brActiveCaption);
return globalData.clrCaptionText;
}
}
if (GetRValue (clrFill) <= 192 &&
GetGValue (clrFill) <= 192 &&
GetBValue (clrFill) <= 192)
{
return RGB (255, 255, 255);
}
else
{
return RGB (0, 0, 0);
}
}
示例5: OnDrawPageHeader
void COptionsPropSheet::OnDrawPageHeader (CDC* pDC, int nPage, CRect rectHeader)
{
CSize sizeIcon = m_Icons.GetImageSize ();
CBCGPDrawManager dm (*pDC);
COLORREF clrBegin, clrFinish;
switch (CBCGPVisualManager2010::GetStyle())
{
case CBCGPVisualManager2010::VS2010_Blue:
clrBegin = RGB(207, 221, 238);
clrFinish = RGB(186, 202, 222);
break;
case CBCGPVisualManager2010::VS2010_Black:
clrBegin = RGB(131, 131, 131);
clrFinish = RGB(57, 57, 57);
break;
case CBCGPVisualManager2010::VS2010_Silver:
clrBegin = RGB(233, 237, 241);
clrFinish = RGB(200, 204, 209);
break;
}
dm.FillGradient (rectHeader, clrBegin, clrFinish);
rectHeader.bottom -= 10;
CRect rectIcon = rectHeader;
rectIcon.left += 20;
rectIcon.right = rectIcon.left + sizeIcon.cx;
m_Icons.DrawEx (pDC, rectIcon, nPage, CBCGPToolBarImages::ImageAlignHorzLeft, CBCGPToolBarImages::ImageAlignVertCenter);
CString strText;
BOOL bNameVaild;
switch (nPage)
{
case 0:
bNameVaild = strText.LoadString(IDS_STRING_CHANGEOPTIONS);
ASSERT(bNameVaild);
break;
case 1:
bNameVaild = strText.LoadString(IDS_STRING_CHANGEVISIT);
ASSERT(bNameVaild);
break;
case 2:
bNameVaild = strText.LoadString(IDS_STRING_LINKEUPDATE);
ASSERT(bNameVaild);
break;
}
CRect rectText = rectHeader;
rectText.left = rectIcon.right + 10;
rectText.right -= 20;
CFont* pOldFont = pDC->SelectObject (&globalData.fontBold);
pDC->SetBkMode (TRANSPARENT);
pDC->SetTextColor (globalData.clrBarText);
UINT uiFlags = DT_SINGLELINE | DT_VCENTER;
CRect rectTextCalc = rectText;
pDC->DrawText (strText, rectTextCalc, uiFlags | DT_CALCRECT);
if (rectTextCalc.right > rectText.right)
{
rectText.DeflateRect (0, 10);
uiFlags = DT_WORDBREAK;
}
pDC->DrawText (strText, rectText, uiFlags);
pDC->SelectObject (pOldFont);
}