ExtPaintManager.cpp
上传用户:sesekoo
上传日期:2020-07-18
资源大小:21543k
文件大小:1653k
- 0x55,
- };
- CBrush br;
- CBitmap bmp;
- bmp.CreateBitmap( 8, 8, 1, 1, hatchBits );
- br.CreatePatternBrush( &bmp );
- LOGBRUSH lbr;
- br.GetLogBrush( &lbr );
- HPEN hPenDesired =
- ::ExtCreatePen(
- PS_GEOMETRIC,
- 1,
- &lbr,
- 0,
- NULL
- );
- if( hPenDesired == NULL )
- {
- COLORREF clrDesiredSolidPen =
- GetColor( COLOR_3DSHADOW, _pdfd.m_pHelperSrc, _pdfd.m_lParam );
- hPenDesired =
- ::CreatePen(
- PS_SOLID,
- 1,
- clrDesiredSolidPen
- );
- if( hPenDesired == NULL )
- {
- hPenDesired = (HPEN)
- ::GetStockObject(BLACK_PEN);
- ASSERT( hPenDesired != NULL );
- } // if( hPenDesired == NULL )
- } // if( hPenDesired == NULL )
- // CPen pen( PS_GEOMETRIC, 1, &lbr );
- CPen pen;
- VERIFY( pen.Attach( hPenDesired ) );
- CPen * pOldPen = dc.SelectObject( &pen );
- if( m_bHelperXpStyle8BitBarRect )
- {
- dc.MoveTo( rcWnd.left, rcWnd.top );
- dc.LineTo( rcWnd.right-1, rcWnd.top );
- dc.LineTo( rcWnd.right-1, rcWnd.bottom-1 );
- dc.LineTo( rcWnd.left, rcWnd.bottom-1 );
- dc.LineTo( rcWnd.left, rcWnd.top );
- } // if( m_bHelperXpStyle8BitBarRect )
- else
- {
- static const SIZE g_sizeRO = { 2, 2 };
- dc.MoveTo( rcWnd.left+g_sizeRO.cx, rcWnd.top );
- dc.LineTo( rcWnd.right-1-g_sizeRO.cx, rcWnd.top );
- dc.LineTo( rcWnd.right-1, rcWnd.top+g_sizeRO.cy );
- dc.LineTo( rcWnd.right-1, rcWnd.bottom-1-g_sizeRO.cy );
- dc.LineTo( rcWnd.right-1-g_sizeRO.cx, rcWnd.bottom-1 );
- dc.LineTo( rcWnd.left+g_sizeRO.cx, rcWnd.bottom-1 );
- dc.LineTo( rcWnd.left, rcWnd.bottom-1-g_sizeRO.cy );
- dc.LineTo( rcWnd.left, rcWnd.top+g_sizeRO.cy );
- dc.LineTo( rcWnd.left+g_sizeRO.cx, rcWnd.top );
- } // else from if( m_bHelperXpStyle8BitBarRect )
- dc.SelectObject( pOldPen );
- } // if( !_pdfd.m_bSideBar && ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) < 8 )
- } // else from if( _pdfd.m_bFloating )
- dc.SetBkColor( clrBkOld );
- //dc.IntersectClipRect(rectWindow);
- dc.SelectClipRgn(NULL);
- }
- void CExtPaintManagerOffice2007_Impl::PaintDockingCaptionButton(
- CDC & dc,
- CExtPaintManager::PAINTDOCKINGCAPTIONBUTTONDATA & _pdcbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- ASSERT(
- __DCBT_VALUE_MIN <= _pdcbd.m_eType
- && _pdcbd.m_eType <= __DCBT_VALUE_MAX
- );
- if( _pdcbd.m_rcClient.IsRectEmpty() )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintDockingCaptionButton(
- dc,
- _pdcbd
- );
- return;
- }
- if( _pdcbd.m_pHelperSrc == NULL
- || ( ! _pdcbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarNcAreaButton) ) )
- )
- {
- CExtPaintManagerOffice2003::PaintDockingCaptionButton( dc, _pdcbd );
- return;
- }
- CExtControlBar * pBar = ((CExtBarNcAreaButton*)_pdcbd.m_pHelperSrc)->GetBar();
- ASSERT_VALID( pBar );
- bool bFixedMode =
- ( pBar->IsFixedMode()
- //|| pBar->IsKindOf( RUNTIME_CLASS(CExtDynControlBar) )
- //|| pBar->IsFloating()
- )
- ;
- bool bHover = _pdcbd.m_bHover;
- if( !_pdcbd.m_bEnabled )
- bHover = false;
- COLORREF ColorValues[2] =
- {
- RGB(0,0,0),
- RGB(0,0,0),
- };
- if( _pdcbd.m_bEnabled )
- {
- if( _pdcbd.m_bPushed )
- ColorValues[1] =
- bFixedMode
- ? m_clrDockingCaptionShapeFixedPushed
- : m_clrDockingCaptionShapeResizablePushed
- ;
- else if( _pdcbd.m_bHover )
- ColorValues[1] =
- bFixedMode
- ? m_clrDockingCaptionShapeFixedHover
- : m_clrDockingCaptionShapeResizableHover
- ;
- else
- ColorValues[1] =
- bFixedMode
- ? m_clrDockingCaptionShapeFixedNormal
- : m_clrDockingCaptionShapeResizableNormal
- ;
- } // if( bEnabled )
- else
- {
- ColorValues[1] =
- bFixedMode
- ? m_clrDockingCaptionShapeFixedDisabled
- : m_clrDockingCaptionShapeResizableDisabled
- ;
- } // else from if( bEnabled )
- CRect rcGlyph( _pdcbd.m_rcClient );
- rcGlyph.NormalizeRect();
- if( bHover || _pdcbd.m_bPushed )
- {
- dc.FillSolidRect(
- &rcGlyph,
- GetColor(
- _pdcbd.m_bPushed
- ? XPCLR_HILIGHT
- : CLR_3DFACE_IN
- ,
- _pdcbd.m_pHelperSrc,
- _pdcbd.m_lParam
- )
- );
- CRect rcBtnBorder(rcGlyph);
- rcBtnBorder.InflateRect(1,1);
- COLORREF clrBtnBorder = GetColor( _pdcbd.m_bBarWndActive ? XPCLR_HILIGHT : XPCLR_HILIGHT_BORDER, _pdcbd.m_pHelperSrc, _pdcbd.m_lParam );
- dc.Draw3dRect( rcBtnBorder, clrBtnBorder, clrBtnBorder );
- }
- if( rcGlyph.Width() & 1 )
- rcGlyph.left++;
- if( rcGlyph.Height() & 1 )
- rcGlyph.top++;
- int eType = _pdcbd.m_eType;
- if( _pdcbd.m_bSideBar && !_pdcbd.m_bFloating && eType == __DCBT_CLOSE )
- eType = __DCBT_XP_THIN_CLOSE;
- #ifdef __FREIWALD_ORIGINAL__
- if( _pdcbd.m_bSideBar && !_pdcbd.m_bFloating && eType == __DCBT_CLOSE )
- eType = __DCBT_XP_THIN_CLOSE;
- #else
- #endif
- glyph_t * pGlyph = g_DockingCaptionGlyphs[eType];
- ASSERT( pGlyph != NULL );
- PaintGlyphCentered(
- dc,
- rcGlyph,
- *pGlyph,
- ColorValues
- );
- }
- bool CExtPaintManagerOffice2007_Impl::IsMenuMustCombineExcludeArea(
- const CObject * pMenuTrackerObject // = NULL
- ) const
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return
- CExtPaintManagerXP::IsMenuMustCombineExcludeArea(
- pMenuTrackerObject
- );
- if( pMenuTrackerObject != NULL )
- {
- if( pMenuTrackerObject->IsKindOf( RUNTIME_CLASS( CExtToolControlBar ) )
- || pMenuTrackerObject->IsKindOf( RUNTIME_CLASS( CExtBarNcAreaButton ) )
- || pMenuTrackerObject->IsKindOf( RUNTIME_CLASS( CExtBarButton ) )
- || pMenuTrackerObject->IsKindOf( RUNTIME_CLASS( CExtMiniDockFrameWnd ) )
- || pMenuTrackerObject->IsKindOf( RUNTIME_CLASS( CExtPopupMenuWnd ) )
- )
- return true;
- } // if( pMenuTrackerObject != NULL )
- return false;
- }
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- CRect CExtPaintManager::Ribbon_CalcLargeDropDownRect(
- const CExtBarButton * pTBB,
- LPARAM lParam // = 0L
- )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( pTBB );
- lParam;
- INT nAdvance = UiScalingDo( 39, __EUIST_Y );
- CRect rc = *pTBB;
- rc.top += nAdvance;
- return rc;
- }
- CRect CExtPaintManagerOffice2007_Impl::Ribbon_CalcLargeDropDownRect(
- const CExtBarButton * pTBB,
- LPARAM lParam // = 0L
- )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( pTBB );
- if( IsHighContrast() )
- return
- CExtPaintManagerXP::Ribbon_CalcLargeDropDownRect(
- pTBB,
- lParam
- );
- return
- CExtPaintManager::Ribbon_CalcLargeDropDownRect(
- pTBB,
- lParam
- );
- }
- void CExtPaintManager::Ribbon_PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_rcClient.IsRectEmpty() )
- return;
- if( ! dc.RectVisible( &_ppbd.m_rcClient ) )
- return;
- ASSERT_VALID( _ppbd.m_pHelperSrc );
- CExtBarButton * pTBB = DYNAMIC_DOWNCAST( CExtBarButton, _ppbd.m_pHelperSrc );
- ASSERT( pTBB != NULL );
- CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
- CExtRibbonButton * pRibbonTBB = DYNAMIC_DOWNCAST( CExtRibbonButton, _ppbd.m_pHelperSrc );
- CExtSafeString strText = pTBB->GetText();
- INT nTextLength = strText.GetLength();
- enum e_layout_case_t
- {
- __ELC_TOOL,
- __ELC_SMALL,
- __ELC_LARGE,
- };
- e_layout_case_t eLC = __ELC_TOOL;
- if( pRibbonTBB != NULL )
- {
- if( pParentTBB == NULL
- || pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
- )
- {
- if( pParentTBB == NULL )
- {
- const CExtRibbonNode * pRibbonNode = pTBB->Ribbon_GetNode();
- if( pRibbonNode != NULL )
- {
- const CExtCustomizeCmdTreeNode * pParentNode = pRibbonNode->GetParentNode();
- if( pParentNode != NULL
- && ( pParentNode->IsKindOf( RUNTIME_CLASS( CExtRibbonNodeRightButtonsCollection ) )
- || pParentNode->IsKindOf( RUNTIME_CLASS( CExtRibbonNodeQuickAccessButtonsCollection ) )
- )
- )
- eLC = __ELC_SMALL;
- } // if( pRibbonNode != NULL )
- } // if( pParentTBB == NULL )
- }
- else
- {
- if( pRibbonTBB->RibbonILV_Get() == __EXT_RIBBON_ILV_SIMPLE_LARGE )
- eLC = __ELC_LARGE;
- else
- eLC = __ELC_SMALL;
- }
- } // if( pRibbonTBB != NULL )
- else
- {
- if( pParentTBB == NULL
- || ( ! pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
- )
- eLC = __ELC_SMALL;
- } // if( pRibbonTBB != NULL )
- INT nILV = pTBB->RibbonILV_Get();
- CRect rcCP = pTBB->OnRibbonGetContentPadding();
- CRect rcIcon = _ppbd.m_rcClient;
- rcIcon.DeflateRect( rcCP.left, rcCP.top, rcCP.right, rcCP.bottom );
- INT nTextToIconDistance = 0;
- CRect rcText = rcIcon;
- CSize _sizeIcon( 0, 0 );
- CExtCmdIcon * pCmdIcon = pTBB->GetIconPtr();
- if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
- {
- _sizeIcon = Ribbon_GetIconSize( pTBB, nILV, _ppbd.m_lParam );
- if( nTextLength >= 0 )
- nTextToIconDistance = Ribbon_GetTextToIconDistance( dc, nILV, pTBB, _ppbd.m_lParam );
- if( eLC == __ELC_LARGE )
- {
- rcIcon.bottom = rcIcon.top + _sizeIcon.cy;
- rcIcon.OffsetRect( ( rcIcon.Width() - _sizeIcon.cx ) / 2, 4 );
- if( nTextLength > 0 )
- {
- rcText.top = rcIcon.bottom;
- rcText.top += nTextToIconDistance;
- };
- } // if( eLC == __ELC_LARGE )
- else
- {
- if( nTextLength > 0 )
- {
- rcIcon.right = rcText.left = rcIcon.left + _sizeIcon.cx;
- rcText.left += nTextToIconDistance;
- }
- else
- {
- rcIcon = _ppbd.m_rcClient;
- if( pTBB->IsAbleToTrackMenu()
- //&& _ppbd.m_bSeparatedDropDown
- && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonGroup ) ) )
- )
- rcIcon.right -= GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- rcIcon.OffsetRect( ( rcIcon.Width() - _sizeIcon.cx ) / 2 + 1, 0 );
- }
- rcIcon.OffsetRect( 0, ( rcIcon.Height() - _sizeIcon.cy ) / 2 );
- } // else from if( eLC == __ELC_LARGE )
- } // if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
- else
- pCmdIcon = NULL;
- bool bDrawDropDownWithText = _ppbd.m_bDropDown;
- switch( eLC )
- {
- case __ELC_TOOL:
- {
- bDrawDropDownWithText = false;
- PAINTPUSHBUTTONDATA _ppbd2 = _ppbd;
- _ppbd2.m_pHelperSrc = NULL;
- _ppbd2.m_pIcon = NULL;
- _ppbd2.m_sText = _T("");
- _ppbd2.m_bTransparentBackground = false;
- // _ppbd2.m_bDropDown = false;
- // _ppbd2.m_bSeparatedDropDown = false;
- // _ppbd2.m_bPushedDropDown = false;
- _ppbd2.m_bFlat = false;
- if( ! ( _ppbd2.m_bHover || _ppbd2.m_bPushed || _ppbd2.m_bIndeterminate ) )
- _ppbd2.m_clrForceBk = GetColor( CLR_3DFACE_OUT, _ppbd2.m_pHelperSrc, _ppbd2.m_lParam );
- PaintPushButton( dc, _ppbd2 );
- if( _ppbd2.m_bDropDown )
- rcIcon.OffsetRect( _ppbd.m_rcClient.left - rcIcon.left + 5, 0 );
- }
- break; // case __ELC_TOOL
- case __ELC_LARGE:
- ASSERT_VALID( pTBB );
- rcText = Ribbon_CalcLargeDropDownRect( pTBB );
- if( ! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButton ) ) )
- bDrawDropDownWithText = false;
- case __ELC_SMALL:
- {
- if( _ppbd.m_bEnabled && ( _ppbd.m_bHover || _ppbd.m_bPushed || _ppbd.m_bIndeterminate ) )
- {
- PAINTPUSHBUTTONDATA _ppbd2 = _ppbd;
- _ppbd2.m_pHelperSrc = NULL;
- _ppbd2.m_pIcon = NULL;
- _ppbd2.m_sText = _T("");
- _ppbd2.m_bTransparentBackground = false;
- _ppbd2.m_bNoDropDownArrow = true;
- bool bDrawSepH = false;
- if( eLC == __ELC_LARGE )
- {
- _ppbd2.m_bDropDown = false;
- _ppbd2.m_bSeparatedDropDown = false;
- _ppbd2.m_bPushedDropDown = false;
- bDrawSepH = _ppbd.m_bDropDown && _ppbd.m_bSeparatedDropDown;
- }
- _ppbd2.m_bFlat = true;
- PaintPushButton( dc, _ppbd2 );
- if( bDrawSepH )
- {
- CRect rcSepH = rcText;
- rcSepH.bottom = rcSepH.top + 3;
- rcSepH.DeflateRect( 3, 0, 2, 0 );
- // if( g_PaintManager.m_nLPY > 96 )
- // {
- // INT nAdvace = UiScalingDo( 4, __EUIST_Y );
- // rcSepH.OffsetRect( 0, nAdvace );
- // }
- PaintSeparator( dc, rcSepH, false, true, NULL );
- } // if( bDrawSepH )
- } // if( _ppbd.m_bEnabled && ( _ppbd.m_bHover || _ppbd.m_bPushed || _ppbd.m_bIndeterminate ) )
- }
- break; // cases __ELC_LARGE and __ELC_SMALL
- } // switch( eLC )
- if( pCmdIcon != NULL )
- {
- ASSERT( ! pCmdIcon->IsEmpty() );
- CSize _sizeRealIcon = pCmdIcon->GetSize();
- if( _sizeRealIcon != _sizeIcon )
- rcIcon.OffsetRect(
- ( _sizeIcon.cx - _sizeRealIcon.cx ) / 2,
- ( _sizeIcon.cy - _sizeRealIcon.cy) / 2
- );
- rcIcon.right = rcIcon.left + _sizeRealIcon.cx;
- rcIcon.bottom = rcIcon.top + _sizeRealIcon.cy;
- bool bCenterBigIconVerticallyMode = ( eLC == __ELC_LARGE && nTextLength == 0 && ( ! _ppbd.m_bDropDown ) ) ? true : false;
- if( bCenterBigIconVerticallyMode)
- rcIcon.OffsetRect(
- 0,
- _ppbd.m_rcClient.top - rcIcon.top + ( _ppbd.m_rcClient.Height() - rcIcon.Height() ) / 2
- );
- CExtCmdIcon::e_paint_type_t ePT = CExtCmdIcon::__PAINT_DISABLED;
- if( _ppbd.m_bEnabled )
- {
- if( _ppbd.m_bPushed )
- ePT = CExtCmdIcon::__PAINT_PRESSED;
- else if( _ppbd.m_bHover )
- ePT = CExtCmdIcon::__PAINT_HOVER;
- else
- ePT = CExtCmdIcon::__PAINT_NORMAL;
- } // if( _ppbd.m_bEnabled )
- pCmdIcon->Paint(
- this,
- dc.m_hDC,
- rcIcon,
- ePT
- );
- } // if( pCmdIcon != NULL )
- if( nTextLength > 0 || _ppbd.m_bDropDown )
- {
- UINT nDT = 0;
- if( eLC != __ELC_LARGE )
- {
- strText.Replace( _T("r"), _T(" ") );
- strText.Replace( _T("n"), _T(" ") );
- strText.Replace( _T("t"), _T(" ") );
- strText.Replace( _T(" "), _T(" ") );
- strText.TrimLeft( _T(" ") );
- strText.TrimRight( _T(" ") );
- nTextLength = INT( strText.GetLength() );
- nDT = DT_CENTER|DT_VCENTER|DT_SINGLELINE;
- } // if( eLC != __ELC_LARGE )
- else
- nDT = DT_CENTER|DT_TOP;
- if( nTextLength > 0 || _ppbd.m_bDropDown )
- {
- CFont * pFont = pTBB->GetBar()->OnGetToolbarFont( false, false );
- ASSERT( pFont->GetSafeHandle() != NULL );
- CFont * pOldFont = dc.SelectObject( pFont );
- int nOldBkMode = dc.SetBkMode( TRANSPARENT );
- COLORREF clrText = GetColor( _ppbd.m_bEnabled ? COLOR_BTNTEXT : CLR_TEXT_DISABLED );
- COLORREF clrOldText = dc.SetTextColor( clrText );
- // if( eLC == __ELC_LARGE )
- Ribbon_PaintText(
- dc,
- ( nTextLength > 0 ) ? LPCTSTR(strText) : _T(""),
- rcText,
- nDT,
- bDrawDropDownWithText,
- NULL,
- _ppbd.m_pHelperSrc,
- _ppbd.m_lParam
- );
- // else
- // dc.DrawText(
- // LPCTSTR(strText),
- // nTextLength,
- // rcText,
- // nDT
- // );
- dc.SetTextColor( clrOldText );
- dc.SetBkMode( nOldBkMode );
- dc.SelectObject( pOldFont );
- } // if( nTextLength > 0 || _ppbd.m_bDropDown )
- } // if( nTextLength > 0 || _ppbd.m_bDropDown )
- }
- void CExtPaintManagerOffice2007_Impl::Ribbon_PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_rcClient.IsRectEmpty() )
- return;
- if( ! dc.RectVisible( &_ppbd.m_rcClient ) )
- return;
- ASSERT_VALID( _ppbd.m_pHelperSrc );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::Ribbon_PaintPushButton( dc, _ppbd );
- return;
- }
- CExtBarButton * pTBB = DYNAMIC_DOWNCAST( CExtBarButton, _ppbd.m_pHelperSrc );
- ASSERT( pTBB != NULL );
- CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
- CExtRibbonButton * pRibbonTBB = DYNAMIC_DOWNCAST( CExtRibbonButton, _ppbd.m_pHelperSrc );
- enum e_layout_case_t
- {
- __ELC_TOOL,
- __ELC_SMALL,
- __ELC_LARGE,
- };
- bool bF = false;
- e_layout_case_t eLC = __ELC_TOOL;
- e_button_tool_style_arr_t eBTS1 = __EBTSA_SOLID; //, eBTS2 = __EBTSA_SOLID;
- if( pRibbonTBB != NULL )
- {
- if( pParentTBB == NULL
- || pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
- )
- {
- if( pParentTBB == NULL )
- {
- const CExtRibbonNode * pRibbonNode = pTBB->Ribbon_GetNode();
- if( pRibbonNode != NULL )
- {
- const CExtCustomizeCmdTreeNode * pParentNode = pRibbonNode->GetParentNode();
- if( pParentNode != NULL
- && ( pParentNode->IsKindOf( RUNTIME_CLASS( CExtRibbonNodeRightButtonsCollection ) )
- || pParentNode->IsKindOf( RUNTIME_CLASS( CExtRibbonNodeQuickAccessButtonsCollection ) )
- )
- )
- eLC = __ELC_SMALL;
- } // if( pRibbonNode != NULL )
- } // if( pParentTBB == NULL )
- }
- else
- {
- if( pRibbonTBB->RibbonILV_Get() == __EXT_RIBBON_ILV_SIMPLE_LARGE )
- eLC = __ELC_LARGE;
- else
- eLC = __ELC_SMALL;
- }
- } // if( pRibbonTBB != NULL )
- else
- {
- if( pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonFile ) )
- || pTBB->IsKindOf( RUNTIME_CLASS( CExtBarCheckBoxButton ) )
- || pTBB->IsKindOf( RUNTIME_CLASS( CExtBarRadioBoxButton ) )
- || pParentTBB == NULL
- || ( ! pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
- )
- {
- eLC = __ELC_SMALL;
- bF = true;
- }
- } // if( pRibbonTBB != NULL )
- CExtBitmap * pBmp1 = NULL, * pBmp2 = NULL, * pBmp3 = NULL, * pBmp4 = NULL;
- CRect rcSrc1( 0, 0, 0, 0 ), rcDst1( 0, 0, 0, 0 ), rcPadding1( 0, 0, 0, 0 );
- CRect rcSrc2( 0, 0, 0, 0 ), rcDst2( 0, 0, 0, 0 ), rcPadding2( 0, 0, 0, 0 );
- CRect rcSrc3( 0, 0, 0, 0 ), rcDst3( 0, 0, 0, 0 ), rcPadding3( 0, 0, 0, 0 );
- CRect rcSrc4( 0, 0, 0, 0 ), rcDst4( 0, 0, 0, 0 ), rcPadding4( 0, 0, 0, 0 );
- CExtSafeString strText = pTBB->GetText();
- INT nTextLength = strText.GetLength();
- INT nILV = pTBB->RibbonILV_Get();
- CRect rcCP = pTBB->OnRibbonGetContentPadding();
- CRect rcIcon = _ppbd.m_rcClient;
- rcIcon.DeflateRect( rcCP.left, rcCP.top, rcCP.right, rcCP.bottom );
- INT nTextToIconDistance = 0;
- CRect rcText = rcIcon;
- // if( pTBB->IsAbleToTrackMenu()
- // && eLC != __ELC_LARGE
- // )
- // {
- // INT nDropDownButtonWidth = GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- // rcIcon.right -= nDropDownButtonWidth + 3;
- // }
- CSize _sizeIcon( 0, 0 );
- CExtCmdIcon * pCmdIcon = pTBB->GetIconPtr();
- if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
- {
- _sizeIcon = Ribbon_GetIconSize( pTBB, nILV, _ppbd.m_lParam );
- if( nTextLength >= 0 )
- nTextToIconDistance = Ribbon_GetTextToIconDistance( dc, nILV, pTBB, _ppbd.m_lParam );
- if( eLC == __ELC_LARGE )
- {
- rcIcon.bottom = rcIcon.top + _sizeIcon.cy;
- rcIcon.OffsetRect( ( rcIcon.Width() - _sizeIcon.cx ) / 2, 4 );
- if( nTextLength > 0 )
- {
- rcText.top = rcIcon.bottom;
- rcText.top += nTextToIconDistance;
- };
- } // if( eLC == __ELC_LARGE )
- else
- {
- if( nTextLength > 0 )
- {
- rcIcon.right = rcText.left = rcIcon.left + _sizeIcon.cx;
- rcText.left += nTextToIconDistance;
- }
- else
- {
- rcIcon = _ppbd.m_rcClient;
- if( pTBB->IsAbleToTrackMenu()
- //&& _ppbd.m_bSeparatedDropDown
- && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonGroup ) ) )
- )
- rcIcon.right -= GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- rcIcon.OffsetRect( ( rcIcon.Width() - _sizeIcon.cx ) / 2 + 1, 0 );
- }
- rcIcon.OffsetRect( 0, ( rcIcon.Height() - _sizeIcon.cy ) / 2 );
- } // else from if( eLC == __ELC_LARGE )
- } // if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
- else
- pCmdIcon = NULL;
- CExtToolControlBar * pToolBar = pTBB->GetBar();
- ASSERT_VALID( pToolBar );
- CExtMenuControlBar * pMenuBar = DYNAMIC_DOWNCAST( CExtMenuControlBar, pToolBar );
- bool bSelTrackingMode = false;
- if( pMenuBar != NULL
- && pMenuBar->IsMenuBarTracking()
- && pMenuBar->_FlatTrackingIndexGet() == pMenuBar->_GetIndexOf( pTBB )
- )
- bSelTrackingMode = true;
- bool bDrawDropDownWithText = _ppbd.m_bDropDown;
- switch( eLC )
- {
- case __ELC_TOOL:
- {
- bDrawDropDownWithText = false;
- if( pTBB->IsAbleToTrackMenu()
- //&& _ppbd.m_bSeparatedDropDown
- )
- rcIcon.OffsetRect( _ppbd.m_rcClient.left - rcIcon.left + 3, 0 );
- if( pParentTBB != NULL )
- {
- ASSERT_KINDOF( CExtRibbonButtonToolGroup, pParentTBB );
- INT nSiblingCount = pParentTBB->ChildButtonGetCount();
- ASSERT( nSiblingCount > 0 );
- CExtBarButton * pFirstTBB = pParentTBB->ChildButtonGetAt( 0 );
- ASSERT_VALID( pFirstTBB );
- CExtBarButton * pLastTBB = pParentTBB->ChildButtonGetAt( nSiblingCount - 1 );
- ASSERT_VALID( pLastTBB );
- if( LPVOID(pTBB) == LPVOID(pFirstTBB) )
- {
- if( LPVOID(pTBB) == LPVOID(pLastTBB) )
- {
- // if( ! _ppbd.m_bSeparatedDropDown )
- eBTS1 = __EBTSA_SOLID;
- // else
- // {
- // eBTS1 = __EBTSA_LEFT;
- // eBTS2 = __EBTSA_RIGHT;
- // }
- }
- else
- {
- eBTS1 = __EBTSA_LEFT;
- // if( _ppbd.m_bSeparatedDropDown )
- // eBTS2 = __EBTSA_MIDDLE;
- }
- } // if( LPVOID(pTBB) == LPVOID(pFirstTBB) )
- else if( LPVOID(pTBB) == LPVOID(pLastTBB) )
- {
- // if( ! _ppbd.m_bSeparatedDropDown )
- eBTS1 = __EBTSA_RIGHT;
- // else
- // {
- // eBTS1 = __EBTSA_MIDDLE;
- // eBTS2 = __EBTSA_RIGHT;
- // }
- }
- else
- eBTS1 = __EBTSA_MIDDLE; // eBTS1 = eBTS2 = __EBTSA_MIDDLE;
- if( Ribbon_HaveSeparatorsBetweenToolGroups() )
- {
- CExtBarButton * pParentParentTBB = pParentTBB->ParentButtonGet();
- if( pParentParentTBB != NULL )
- {
- ASSERT_VALID( pParentParentTBB );
- CExtBarButton * pParentParentFirstTBB = pParentParentTBB->ChildButtonGetAt( 0 );
- ASSERT_VALID( pParentParentFirstTBB );
- if( LPVOID(pParentTBB) != LPVOID(pParentParentFirstTBB) )
- {
- INT nPPCount = pParentParentTBB->ChildButtonGetCount();
- ASSERT( nPPCount > 0 );
- CExtBarButton * pParentParentLastTBB = pParentParentTBB->ChildButtonGetAt( nPPCount - 1 );
- ASSERT_VALID( pParentParentLastTBB );
- if( LPVOID(pParentTBB) != LPVOID(pParentParentLastTBB) )
- {
- INT nTGI = pParentParentTBB->ChildButtonGetIndexOf( pParentTBB );
- ASSERT( nTGI < ( nPPCount - 1 ) );
- CExtBarButton * pNextTGTBB = pParentParentTBB->ChildButtonGetAt( nTGI + 1 );
- ASSERT_VALID( pNextTGTBB );
- //ASSERT_KINDOF( CExtRibbonButtonToolGroup, pNextTGTBB );
- CRect rcNextTG = pNextTGTBB->Rect();
- CRect rcThisTG = pParentTBB->Rect();
- if( rcThisTG.top == rcNextTG.top && rcThisTG.bottom == rcNextTG.bottom )
- {
- CRect rcSepTG( rcThisTG.right, rcThisTG.top, rcNextTG.left, rcThisTG.bottom );
- if( rcSepTG.left < rcSepTG.right )
- {
- //dc.FillSolidRect( &rcSepTG, 255 );
- Ribbon_PaintSeparator( dc, rcSepTG, NULL );
- }
- }
- }
- }
- }
- }
- } // if( pParentTBB != NULL )
- INT nImgIndex1 = INT(__E07BI_NORMAL);
- INT nImgIndex2 = INT(__E07BI_NORMAL);
- if( bSelTrackingMode )
- nImgIndex1 = nImgIndex2 = INT(__E07BI_SEL_T);
- else if( _ppbd.m_bEnabled )
- {
- if( _ppbd.m_bPushed || ( _ppbd.m_bIndeterminate && ( ! _ppbd.m_bHover ) ) )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BI_PRESSED);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bPushedDropDown )
- nImgIndex1 = INT(__E07BI_SEL_T);
- else
- nImgIndex2 = INT(__E07BI_SEL_T);
- }
- }
- else if( _ppbd.m_bHover )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BI_HOVER);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bHoverDropDown )
- nImgIndex1 = INT(__E07BI_SEL_T);
- else
- nImgIndex2 = INT(__E07BI_SEL_T);
- }
- }
- else if( _ppbd.m_bIndeterminate )
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_INDETERMINATE);
- } // else if( _ppbd.m_bEnabled )
- nImgIndex1 = m_arrIndicesButtonTS[nImgIndex1];
- nImgIndex2 = m_arrIndicesButtonTS[nImgIndex2];
- if( nImgIndex1 >= 0 )
- {
- pBmp1 = &( m_bmpArrButtonTS[ INT(eBTS1) ] );
- rcPadding1 = m_rcPaddingOfButtonTS;
- CSize _sizeBmp = pBmp1->GetSize();
- rcSrc1.SetRect( 0, 0, _sizeBmp.cx, m_nHeightOfButtonTS );
- rcSrc1.OffsetRect( 0, m_nHeightOfButtonTS*nImgIndex1 );
- } // if( nImgIndex1 >= 0 )
- rcDst1 = rcDst2 = _ppbd.m_rcClient;
- if( _ppbd.m_bSeparatedDropDown
- && ( _ppbd.m_bHover || _ppbd.m_bPushed || _ppbd.m_bIndeterminate )
- && _ppbd.m_bEnabled
- )
- {
- pBmp3 = &( m_bmpToolBtnSeparator[ ( _ppbd.m_bPushed || ( _ppbd.m_bIndeterminate && ( ! _ppbd.m_bHover ) ) ) ? INT(__ETBS_PRESSED) : INT(__ETBS_HOVER) ] );
- rcPadding3 = m_rcPaddingOfToolButtonSeparator;
- CSize _sizeBmp = pBmp3->GetSize();
- rcSrc3.SetRect( 0, 0, _sizeBmp.cx, _sizeBmp.cy );
- INT nDropDownButtonWidth = GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- rcDst3 = _ppbd.m_rcClient;
- rcDst3.right -= nDropDownButtonWidth;
- rcDst3.left = rcDst3.right - _sizeBmp.cx;
- } // if( _ppbd.m_bSeparatedDropDown ...
- if( _ppbd.m_bDropDown )
- {
- pBmp4 = &m_bmpRibbonDDA;
- CSize _sizeBmp = pBmp4->GetSize();
- rcSrc4.SetRect( 0, 0, _sizeBmp.cx, _sizeBmp.cy );
- INT nDropDownButtonWidth = GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- rcDst4 = _ppbd.m_rcClient;
- rcDst4.left = rcDst4.right - nDropDownButtonWidth;
- rcDst4.left += ( rcDst4.Width() - _sizeBmp.cx ) / 2;
- rcDst4.top += ( rcDst4.Height() - _sizeBmp.cy ) / 2;
- rcDst4.right = rcDst4.left + _sizeBmp.cx;
- rcDst4.bottom = rcDst4.top + _sizeBmp.cy;
- } // if( _ppbd.m_bDropDown )
- if( _ppbd.m_bSeparatedDropDown && nImgIndex2 >= 0 )
- {
- pBmp2 = &( m_bmpArrButtonTS[ INT(eBTS1) ] );
- rcPadding2 = m_rcPaddingOfButtonTS;
- CSize _sizeBmp = pBmp2->GetSize();
- rcSrc2.SetRect( 0, 0, _sizeBmp.cx, m_nHeightOfButtonTS );
- rcSrc2.OffsetRect( 0, m_nHeightOfButtonTS*nImgIndex2 );
- INT nDropDownButtonWidth = GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- rcDst1.right = rcDst2.left = rcDst2.right - nDropDownButtonWidth;
- rcSrc1.right -= rcPadding1.right;
- rcSrc2.left += rcPadding2.left;
- rcPadding1.right = rcPadding2.left = 0;
- } // if( _ppbd.m_bSeparatedDropDown && nImgIndex2 >= 0 )
- }
- break; // case __ELC_TOOL
- case __ELC_SMALL:
- {
- INT nImgIndex1 = INT(__E07BI_NORMAL);
- INT nImgIndex2 = INT(__E07BI_NORMAL);
- if( bSelTrackingMode )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BI_SEL_T);
- }
- else if( _ppbd.m_bEnabled )
- {
- if( _ppbd.m_bPushed || ( _ppbd.m_bIndeterminate && ( ! _ppbd.m_bHover ) ) )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BI_PRESSED);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bPushedDropDown )
- nImgIndex1 = INT(__E07BI_SEL_T);
- else
- nImgIndex2 = INT(__E07BI_SEL_T);
- }
- }
- else if( _ppbd.m_bHover )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BI_HOVER);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bHoverDropDown )
- nImgIndex1 = INT(__E07BI_SEL_T);
- else
- nImgIndex2 = INT(__E07BI_SEL_T);
- }
- }
- else if( _ppbd.m_bIndeterminate )
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_INDETERMINATE);
- } // else if( _ppbd.m_bEnabled )
- nImgIndex1 = m_arrIndicesButtonSS_Left[nImgIndex1];
- nImgIndex2 = m_arrIndicesButtonSS_Right[nImgIndex2];
- if( nImgIndex1 >= 0 )
- {
- if( _ppbd.m_bSeparatedDropDown )
- {
- ASSERT( nImgIndex2 >= 0 );
- pBmp1 = &( m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)] );
- pBmp2 = &( m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)] );
- rcPadding1 = rcPadding2 = m_rcPaddingOfButtonSS;
- CSize _sizeBmp1 = pBmp1->GetSize();
- CSize _sizeBmp2 = pBmp2->GetSize();
- rcSrc1.SetRect( 0, 0, _sizeBmp1.cx, m_nHeightOfButtonSS );
- rcSrc2.SetRect( 0, 0, _sizeBmp2.cx, m_nHeightOfButtonSS );
- rcSrc1.OffsetRect( 0, m_nHeightOfButtonSS*nImgIndex1 );
- rcSrc2.OffsetRect( 0, m_nHeightOfButtonSS*nImgIndex2 );
- rcDst1 = rcDst2 = _ppbd.m_rcClient;
- INT nDropDownButtonWidth = GetDropDownButtonWidth( _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- nDropDownButtonWidth -= rcPadding1.right + 1;
- rcDst1.right -= nDropDownButtonWidth;
- rcDst2.left = rcDst2.right - nDropDownButtonWidth;
- } // if( _ppbd.m_bSeparatedDropDown )
- else
- {
- pBmp1 = &( m_bmpArrButtonSS_simple );
- rcPadding1 = m_rcPaddingOfButtonSS;
- CSize _sizeBmp = pBmp1->GetSize();
- rcSrc1.SetRect( 0, 0, _sizeBmp.cx, m_nHeightOfButtonSS );
- rcSrc1.OffsetRect( 0, m_nHeightOfButtonSS*nImgIndex1 );
- rcDst1 = _ppbd.m_rcClient;
- } // else from if( _ppbd.m_bSeparatedDropDown )
- } // if( nImgIndex1 >= 0 )
- }
- break; // case __ELC_SMALL
- case __ELC_LARGE:
- {
- ASSERT_VALID( pTBB );
- rcText = Ribbon_CalcLargeDropDownRect( pTBB );
- INT nImgIndex1 = INT(__E07BIX_NORMAL);
- INT nImgIndex2 = INT(__E07BIX_NORMAL);
- if( bSelTrackingMode )
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_SELECTED);
- else if( _ppbd.m_bEnabled )
- {
- if( _ppbd.m_bPushed )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_PRESSED);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bPushedDropDown )
- nImgIndex1 = INT(__E07BIX_HOVER2);
- else
- nImgIndex2 = INT(__E07BIX_HOVER2);
- }
- } // if( _ppbd.m_bPushed )
- else if( _ppbd.m_bHover )
- {
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_HOVER);
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( _ppbd.m_bHoverDropDown )
- nImgIndex1 = INT(__E07BIX_HOVER2);
- else
- nImgIndex2 = INT(__E07BIX_HOVER2);
- }
- } // else if( _ppbd.m_bHover )
- else if( _ppbd.m_bIndeterminate )
- nImgIndex1 = nImgIndex2 = INT(__E07BIX_INDETERMINATE);
- } // else if( _ppbd.m_bEnabled )
- nImgIndex1 = m_arrIndicesButtonLSXM[nImgIndex1];
- nImgIndex2 = m_arrIndicesButtonLSXB[nImgIndex2];
- if( nImgIndex1 >= 0 && nImgIndex2 >= 0 )
- {
- pBmp1 = &m_bmpArrButtonLSXM;
- pBmp2 = &m_bmpArrButtonLSXB;
- rcPadding1 = m_rcPaddingOfButtonLSXM;
- rcPadding2 = m_rcPaddingOfButtonLSXB;
- CSize _sizeBmp = pBmp1->GetSize();
- rcSrc1.SetRect( 0, 0, _sizeBmp.cx, m_nHeightOfButtonLSXM );
- rcSrc1.OffsetRect( 0, m_nHeightOfButtonLSXM*nImgIndex1 );
- _sizeBmp = pBmp2->GetSize();
- rcSrc2.SetRect( 0, 0, _sizeBmp.cx, m_nHeightOfButtonLSXB );
- rcSrc2.OffsetRect( 0, m_nHeightOfButtonLSXB*nImgIndex2 );
- if( ! _ppbd.m_bSeparatedDropDown )
- {
- rcSrc1.bottom -= rcPadding1.bottom;
- rcSrc2.top += rcPadding1.top;
- }
- rcDst1 = rcDst2 = _ppbd.m_rcClient;
- rcDst1.bottom = rcDst2.top = rcText.top;
- } // if( nImgIndex1 >= 0 && nImgIndex2 >= 0 )
- }
- break; // case __ELC_LARGE
- } // switch( eLC )
- // DWORD dwDcLayout = dc.GetLayout();
- // if( dwDcLayout&LAYOUT_RTL )
- // dc.SetLayout( LAYOUT_LTR );
- BYTE nButtonIndeterminateSCA = BYTE(0x0FF);
- if( _ppbd.m_bIndeterminate
- && _ppbd.m_bEnabled
- && ( ! _ppbd.m_bHover )
- && ( ! _ppbd.m_bPushed )
- && ( ! _ppbd.m_bPushedDropDown )
- )
- nButtonIndeterminateSCA = BYTE(0x060);
- if( pBmp1 != NULL
- && (! pBmp1->IsEmpty() )
- && (! rcSrc1.IsRectEmpty() )
- && (! rcDst1.IsRectEmpty() )
- && dc.RectVisible( &rcDst1 )
- )
- pBmp1->AlphaBlendSkinParts(
- dc.m_hDC,
- rcDst1,
- rcSrc1,
- rcPadding1,
- CExtBitmap::__EDM_STRETCH,
- true,
- true,
- nButtonIndeterminateSCA
- );
- if( pBmp2 != NULL
- && (! pBmp2->IsEmpty() )
- && (! rcSrc2.IsRectEmpty() )
- && (! rcDst2.IsRectEmpty() )
- && dc.RectVisible( &rcDst2 )
- )
- pBmp2->AlphaBlendSkinParts(
- dc.m_hDC,
- rcDst2,
- rcSrc2,
- rcPadding2,
- CExtBitmap::__EDM_STRETCH,
- true,
- true,
- nButtonIndeterminateSCA
- );
- if( pBmp3 != NULL
- && (! pBmp3->IsEmpty() )
- && (! rcSrc3.IsRectEmpty() )
- && (! rcDst3.IsRectEmpty() )
- && dc.RectVisible( &rcDst3 )
- )
- pBmp3->AlphaBlendSkinParts(
- dc.m_hDC,
- rcDst3,
- rcSrc3,
- rcPadding3,
- CExtBitmap::__EDM_STRETCH,
- true,
- true,
- nButtonIndeterminateSCA
- );
- if( pBmp4 != NULL
- && (! pBmp4->IsEmpty() )
- && (! rcSrc4.IsRectEmpty() )
- && (! rcDst4.IsRectEmpty() )
- && dc.RectVisible( &rcDst4 )
- )
- pBmp4->AlphaBlendSkinParts(
- dc.m_hDC,
- rcDst4,
- rcSrc4,
- rcPadding4,
- CExtBitmap::__EDM_STRETCH,
- true,
- true,
- nButtonIndeterminateSCA
- );
- if( pCmdIcon != NULL )
- {
- ASSERT( ! pCmdIcon->IsEmpty() );
- CSize _sizeRealIcon = pCmdIcon->GetSize();
- if( _sizeRealIcon != _sizeIcon )
- rcIcon.OffsetRect(
- ( _sizeIcon.cx - _sizeRealIcon.cx ) / 2,
- ( _sizeIcon.cy - _sizeRealIcon.cy) / 2
- );
- rcIcon.right = rcIcon.left + _sizeRealIcon.cx;
- rcIcon.bottom = rcIcon.top + _sizeRealIcon.cy;
- // CSize _sizeAdjust = rcIcon.Size() - _sizeIcon;
- // // if( _sizeAdjust.cx > 1 || _sizeAdjust.cy > 1 )
- // // rcIcon.OffsetRect( _sizeAdjust.cx/2, _sizeAdjust.cy/2 );
- // rcIcon.right = rcIcon.left + _sizeIcon.cx;
- // rcIcon.bottom = rcIcon.top + _sizeIcon.cy;
- bool bCenterBigIconVerticallyMode = ( eLC == __ELC_LARGE && nTextLength == 0 && ( ! _ppbd.m_bDropDown ) ) ? true : false;
- if( bCenterBigIconVerticallyMode)
- rcIcon.OffsetRect(
- 0,
- _ppbd.m_rcClient.top - rcIcon.top + ( _ppbd.m_rcClient.Height() - rcIcon.Height() ) / 2
- );
- CExtCmdIcon::e_paint_type_t ePT = CExtCmdIcon::__PAINT_DISABLED;
- if( _ppbd.m_bEnabled )
- {
- if( _ppbd.m_bPushed )
- ePT = CExtCmdIcon::__PAINT_PRESSED;
- else if( _ppbd.m_bHover )
- ePT = CExtCmdIcon::__PAINT_HOVER;
- else
- ePT = CExtCmdIcon::__PAINT_NORMAL;
- } // if( _ppbd.m_bEnabled )
- pCmdIcon->Paint( this, dc.m_hDC, rcIcon, ePT );
- } // if( pCmdIcon != NULL )
- // dc.SetLayout( dwDcLayout );
- if( nTextLength > 0 || _ppbd.m_bDropDown )
- {
- UINT nDT = 0;
- if( eLC != __ELC_LARGE )
- {
- strText.Replace( _T("r"), _T(" ") );
- strText.Replace( _T("n"), _T(" ") );
- strText.Replace( _T("t"), _T(" ") );
- strText.Replace( _T(" "), _T(" ") );
- strText.TrimLeft( _T(" ") );
- strText.TrimRight( _T(" ") );
- nTextLength = INT( strText.GetLength() );
- nDT = ( bF ? DT_LEFT : DT_CENTER ) | DT_VCENTER | DT_SINGLELINE;
- } // if( eLC != __ELC_LARGE )
- else
- nDT = DT_CENTER|DT_TOP;
- if( nTextLength > 0 || _ppbd.m_bDropDown )
- {
- CFont * pFont = pTBB->GetBar()->OnGetToolbarFont( false, false );
- ASSERT( pFont->GetSafeHandle() != NULL );
- CFont * pOldFont = dc.SelectObject( pFont );
- int nOldBkMode = dc.SetBkMode( TRANSPARENT );
- COLORREF clrText = _ppbd.m_bEnabled ? m_clrRibbonButtonNormal : m_clrRibbonButtonDisabled;
- if( ( ! ( _ppbd.m_bHover || _ppbd.m_bPushed ) )
- && IsKindOf( RUNTIME_CLASS(CExtPaintManagerOffice2007_R2_Obsidian) )
- )
- {
- CExtCustomizeCmdTreeNode * pNode = pTBB->GetCmdNode();
- if( pNode != NULL )
- {
- pNode = pNode->GetParentNode();
- if( pNode != NULL
- && pNode->IsKindOf( RUNTIME_CLASS(CExtRibbonNodeRightButtonsCollection) )
- )
- clrText = _ppbd.m_bEnabled ? m_clrNcFrameTextActive : m_clrNcFrameTextInactive;
- }
- }
- // if( bF
- // && _ppbd.m_bEnabled
- // && (! ( _ppbd.m_bPushed || _ppbd.m_bHover ) )
- // && OnQueryPaintManagerName() == Office2007_R2_Obsidian
- // )
- // clrText = RGB(255,255,255);
- COLORREF clrOldText = dc.SetTextColor( clrText );
- // if( eLC == __ELC_LARGE )
- Ribbon_PaintText(
- dc,
- ( nTextLength > 0 ) ? LPCTSTR(strText) : _T(""),
- rcText,
- nDT,
- bDrawDropDownWithText,
- &m_bmpRibbonDDA,
- _ppbd.m_pHelperSrc,
- _ppbd.m_lParam
- );
- // else
- // dc.DrawText(
- // LPCTSTR(strText),
- // nTextLength,
- // rcText,
- // nDT
- // );
- dc.SetTextColor( clrOldText );
- dc.SetBkMode( nOldBkMode );
- dc.SelectObject( pOldFont );
- } // if( nTextLength > 0 || _ppbd.m_bDropDown )
- } // if( nTextLength > 0 || _ppbd.m_bDropDown )
- }
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- void CExtPaintManagerOffice2007_Impl::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_rcClient.IsRectEmpty() )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPushButton( dc, _ppbd );
- return;
- }
- if( ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) <= 8
- || _ppbd.m_pHelperSrc == NULL
- )
- {
- CExtPaintManagerOffice2003::PaintPushButton( dc, _ppbd );
- return;
- }
- if( _ppbd.m_pHelperSrc != NULL
- && _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtPopupMenuWnd) )
- && ( ((CExtPopupMenuWnd*)_ppbd.m_pHelperSrc)->TrackFlagsGet() & TPMX_RIBBON_MODE ) == 0
- )
- {
- CExtPaintManagerOffice2003::PaintPushButton( dc, _ppbd );
- return;
- }
- CExtBarButton * pTBB = DYNAMIC_DOWNCAST( CExtBarButton, _ppbd.m_pHelperSrc );
- if( pTBB != NULL )
- {
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- if( pTBB->IsRibbonPaintingMode() )
- {
- Ribbon_PaintPushButton( dc, _ppbd );
- return;
- }
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- CExtToolControlBar * pBar = pTBB->GetBar();
- if( pBar == NULL )
- {
- CExtPaintManagerOffice2003::PaintPushButton( dc, _ppbd );
- return;
- }
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- if( pBar->IsKindOf( RUNTIME_CLASS( CExtRibbonPage ) )
- && (! pTBB->IsNoRibbonLayout() )
- && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtBarMdiRightButton ) ) )
- )
- {
- Ribbon_PaintPushButton( dc, _ppbd );
- return;
- }
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- CExtPaintManagerOffice2003::PaintPushButton( dc, _ppbd );
- return;
- } // if( pTBB != NULL )
- enum ButtonDrawingMode
- {
- eModeControl,
- eModeToolBar,
- eModeMenuBar,
- eModePopupMenu,
- eModeDatePicker,
- eModeToolBox,
- };
- bool bHorizontal = true;
- ButtonDrawingMode aDrawingMode = eModeControl;
- if( _ppbd.m_pHelperSrc != NULL )
- {
- if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtBarButton ) ) )
- {
- CExtBarButton * pBarButton = (CExtBarButton*)_ppbd.m_pHelperSrc;
- CExtToolControlBar * pToolBar = DYNAMIC_DOWNCAST( CExtToolControlBar, pBarButton->GetBar() );
- ASSERT( pToolBar != NULL );
-
- if( pToolBar->IsKindOf(RUNTIME_CLASS(CExtMenuControlBar)) )
- aDrawingMode = eModeMenuBar;
- else
- aDrawingMode = eModeToolBar;
- if( ! pBarButton->GetNoRotateVerticalLayout() )
- {
- if( pToolBar->IsDockedVertically() )
- bHorizontal = false;
- }
- }
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtPopupMenuWnd ) ) )
- {
- aDrawingMode = eModePopupMenu;
- }
- #ifndef __EXT_MFC_NO_DATE_PICKER
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtDatePickerWnd ) ) )
- {
- aDrawingMode = eModeDatePicker;
- }
- #endif // #ifndef __EXT_MFC_NO_DATE_PICKER
- #ifndef __EXT_MFC_NO_TOOLBOX_CTRL
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtToolBoxWnd ) ) )
- {
- aDrawingMode = eModeToolBox;
- }
- #endif // #ifndef __EXT_MFC_NO_TOOLBOX_CTRL
- else if(
- _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS( CWnd ) )
- && CExtPopupMenuWnd::g_pCombinedHelper == NULL
- && (!_ppbd.m_bTransparentBackground)
- )
- {
- CExtPaintManagerOffice2003::PaintDockerBkgnd( true, dc, (CWnd*)_ppbd.m_pHelperSrc );
- }
- }
- if( aDrawingMode != eModeControl
- && aDrawingMode != eModeDatePicker
- && aDrawingMode != eModeToolBox
- && aDrawingMode != eModeToolBar
- )
- {
- CExtPaintManagerOffice2003::PaintPushButton( dc, _ppbd );
- return;
- }
- CExtBitmap * pBmpSimple =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? (&m_arrBmpPushBtnSDDLeftH) : (&m_arrBmpPushBtnSDDLeftV) )
- : ( bHorizontal ? (&m_arrBmpPushBtnSimpleH) : (&m_arrBmpPushBtnSimpleV) )
- ;
- CExtBitmap * pBmpRP =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? (&m_arrBmpPushBtnSDDRightH) : (&m_arrBmpPushBtnSDDRightV) )
- : NULL
- ;
- INT nGlyphHeightSimple =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? m_nPushBtnSDDLeftGlyphHeightH : m_nPushBtnSDDLeftGlyphHeightV )
- : ( bHorizontal ? m_nPushBtnSimpleGlyphHeightH : m_nPushBtnSimpleGlyphHeightV )
- ;
- INT nGlyphHeightRP =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? m_nPushBtnSDDRightGlyphHeightH : m_nPushBtnSDDRightGlyphHeightV )
- : ( 0 )
- ;
- CRect * pRectPaddingSimple =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? (&m_rcPushBtnSDDLeftPaddingH) : (&m_rcPushBtnSDDLeftPaddingV) )
- : ( bHorizontal ? (&m_rcPushBtnSimplePaddingH) : (&m_rcPushBtnSimplePaddingV) )
- ;
- CRect * pRectPaddingRP =
- _ppbd.m_bSeparatedDropDown
- ? ( bHorizontal ? (&m_rcPushBtnSDDRightPaddingH) : (&m_rcPushBtnSDDRightPaddingV) )
- : NULL
- ;
- if( ! _ppbd.m_bEnabled )
- {
- _ppbd.m_bHover = false;
- _ppbd.m_bDrawFocusRect = false;
- _ppbd.m_bIndeterminate = false;
- }
- e_push_button_glyph_type_t ePBGT_Simple = __EPBGT_NORMAL;
- if( ! _ppbd.m_bEnabled )
- ePBGT_Simple = __EPBGT_DISABLED;
- else if( _ppbd.m_bPushed )
- ePBGT_Simple = __EPBGT_PRESSED;
- else if( _ppbd.m_bHover /*|| _ppbd.m_bDrawFocusRect*/ )
- ePBGT_Simple = __EPBGT_HOVER;
- else if( _ppbd.m_bDefaultPushButton )
- ePBGT_Simple = __EPBGT_DEFAULT;
- e_push_button_glyph_type_t ePBGT_RP = ePBGT_Simple;
- CRect rcSrcSimple( 0, 0, pBmpSimple->GetSize().cx, nGlyphHeightSimple );
- CRect rcSrcRP( 0, 0, 0, 0 );
- if( _ppbd.m_bSeparatedDropDown )
- {
- if( ePBGT_Simple == __EPBGT_HOVER || ePBGT_Simple == __EPBGT_PRESSED )
- {
- if( _ppbd.m_bPushedDropDown )
- ePBGT_Simple = __EPBGT_HH;
- else
- ePBGT_RP = __EPBGT_HH;
- }
- ASSERT( pBmpRP != NULL );
- rcSrcRP.right = pBmpRP->GetSize().cx;
- rcSrcRP.bottom = nGlyphHeightRP;
- rcSrcRP.OffsetRect(
- 0,
- nGlyphHeightRP * INT(ePBGT_RP)
- );
- }
- rcSrcSimple.OffsetRect(
- 0,
- nGlyphHeightSimple * INT(ePBGT_Simple)
- );
- bool bRTL = _ppbd.IsRTL();
- CRect rectClient( _ppbd.m_rcClient );
- CRect rectCaption( &rectClient );
- INT nDDW = g_glyph_btn_expand_bottom.Size().cx;
- if( aDrawingMode == eModeControl )
- nDDW += __DROPDOWN_ARROW_GAP*2;
- else
- nDDW += 4;
- CRect rcDstSimple = rectClient;
- CRect rcPaintSimpleDst = rcDstSimple;
- CRect rcDstRP = rectClient;
- if( _ppbd.m_bDropDown )
- {
- if( bHorizontal )
- {
- rcDstRP.left = rcDstRP.right - nDDW;
- rcDstSimple.right = rcDstRP.left;
- } // if( bHorizontal )
- else
- {
- rcDstRP.top = rcDstRP.bottom - nDDW;
- rcDstSimple.bottom = rcDstRP.top;
- } // else from if( bHorizontal )
- } // if( _ppbd.m_bDropDown )
- if( _ppbd.m_bSeparatedDropDown )
- {
- ASSERT( pBmpRP != NULL );
- pBmpRP->AlphaBlendSkinParts(
- dc.m_hDC,
- rcDstRP,
- rcSrcRP,
- *pRectPaddingRP,
- CExtBitmap::__EDM_STRETCH,
- true,
- true
- );
- rcPaintSimpleDst = rcDstSimple;
- } // if( _ppbd.m_bSeparatedDropDown )
- rectCaption = rcDstSimple;
- pBmpSimple->AlphaBlendSkinParts(
- dc.m_hDC,
- rcPaintSimpleDst,
- rcSrcSimple,
- *pRectPaddingSimple,
- CExtBitmap::__EDM_STRETCH,
- true,
- true
- );
- if( _ppbd.m_bDropDown )
- {
- CRect rectGlyph = rcDstRP;
- if( _ppbd.m_bPushedDropDown )
- rectGlyph.OffsetRect( GetPushedOffset() );
- COLORREF ColorValues[2] =
- {
- RGB(0,0,0),
- RGB(0,0,0),
- };
- bool bSetDefaultColorForDD = true;
- if( _ppbd.m_bEnabled )
- {
- if( m_clrCustomDropDownGlyphEnabled != COLORREF(-1L) )
- {
- ColorValues[1] = m_clrCustomDropDownGlyphEnabled;
- bSetDefaultColorForDD = false;
- }
- }
- else
- {
- if( m_clrCustomDropDownGlyphDisabled != COLORREF(-1L) )
- {
- ColorValues[1] = m_clrCustomDropDownGlyphDisabled;
- bSetDefaultColorForDD = false;
- }
- }
- if( bSetDefaultColorForDD )
- ColorValues[1] = GetColor( _ppbd.m_bEnabled ? COLOR_BTNTEXT : CLR_TEXT_DISABLED, _ppbd.m_pHelperSrc, _ppbd.m_lParam );
- if( bRTL && (rectGlyph.Width()&1) == 0 )
- rectGlyph.right++;
- PaintGlyphCentered( dc, rectGlyph, _ppbd.m_bHorz ? g_glyph_btn_expand_bottom : g_glyph_btn_expand_right, ColorValues );
- } // if( _ppbd.m_bDropDown )
- COLORREF clrOldText = dc.GetTextColor();
- COLORREF clrOldBk = dc.GetBkColor();
- int nOldBkMode = dc.SetBkMode( TRANSPARENT );
- rectCaption.DeflateRect( _ppbd.m_rcBorderSizes );
- rectClient = rectCaption;
- CRect rcFocus( rectCaption );
- // Draw icon
- if( rectClient.bottom > rectClient.top
- && rectClient.right > rectClient.left
- )
- PaintPushButtonIcon( dc, rectClient, rectCaption, rcFocus, _ppbd );
- CExtSafeString sTitle( _T("") );
- if( _ppbd.m_sText != NULL )
- sTitle = _ppbd.m_sText;
- // Draw text
- if( rectCaption.bottom > rectCaption.top
- && rectCaption.right > rectCaption.left
- && (!sTitle.IsEmpty())
- )
- PaintPushButtonText( dc, rectCaption, _ppbd );
- // Draw focus rectangle
- if( _ppbd.m_bDrawFocusRect
- && ( ( !sTitle.IsEmpty() ) || _ppbd.m_nFocusMode == __EBFM_CLIENT_AREA )
- && rcFocus.bottom > rcFocus.top
- && rcFocus.right > rcFocus.left
- )
- {
- rcFocus.DeflateRect( 2, 2 );
- // dc.DrawFocusRect( &rcFocus );
- stat_DrawDotLineH( dc, rcFocus.left, rcFocus.right, rcFocus.top, RGB(0,0,0) );
- stat_DrawDotLineH( dc, rcFocus.left, rcFocus.right, rcFocus.bottom, RGB(0,0,0) );
- stat_DrawDotLineV( dc, rcFocus.left, rcFocus.top, rcFocus.bottom, RGB(0,0,0) );
- stat_DrawDotLineV( dc, rcFocus.right, rcFocus.top, rcFocus.bottom, RGB(0,0,0) );
- }
- dc.SetBkMode( nOldBkMode );
- dc.SetBkColor( clrOldBk );
- dc.SetTextColor( clrOldText );
- }
- void CExtPaintManagerOffice2007_R1::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
- _ppbd.m_clrForceTextDisabled = RGB(141,141,141);
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- }
- void CExtPaintManagerOffice2007_R2_LunaBlue::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
- _ppbd.m_clrForceTextDisabled = RGB(141,141,141);
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- }
- void CExtPaintManagerOffice2007_R2_Silver::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
- _ppbd.m_clrForceTextDisabled = RGB(141,141,141);
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- }
- void CExtPaintManagerOffice2007_R2_Obsidian::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPushButton( dc, _ppbd );
- return;
- }
- if( _ppbd.m_pHelperSrc != NULL
- && _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CButton) )
- )
- {
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- return;
- }
- bool bInvertNormalTextColor = true;
- if( _ppbd.m_bHover || _ppbd.m_bPushed || _ppbd.m_bPushedDropDown )
- bInvertNormalTextColor = false;
- else if( _ppbd.m_clrForceTextNormal == COLORREF(-1L) && _ppbd.m_pHelperSrc != NULL )
- {
- if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarButton) )
- && ( ! _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarMdiRightButton) ) )
- )
- {
- if( LPVOID(CExtPopupMenuWnd::g_pCombinedHelper) == LPVOID(_ppbd.m_pHelperSrc) )
- bInvertNormalTextColor = false;
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarButton) ) )
- {
- CExtToolControlBar * pToolBar = ((CExtBarButton*)_ppbd.m_pHelperSrc)->GetBar();
- ASSERT_VALID( pToolBar );
- if( ! pToolBar->IsKindOf( RUNTIME_CLASS(CExtMenuControlBar) ) )
- {
- if( pToolBar->m_pDockSite == NULL )
- {
- if( pToolBar->m_bForceBalloonGradientInDialogs )
- bInvertNormalTextColor = false;
- }
- else
- {
- if( ! pToolBar->m_bForceNoBalloonWhenRedockable )
- bInvertNormalTextColor = false;
- }
- }
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- else if( pToolBar->IsKindOf( RUNTIME_CLASS(CExtRibbonPage) ) )
- bInvertNormalTextColor = false;
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- }
- }
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtPopupBaseWnd) )
- || _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtMenuControlBar) )
- #if (!defined __EXT_MFC_NO_DATE_PICKER)
- || _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtDatePickerWnd) )
- #endif // (!defined __EXT_MFC_NO_DATE_PICKER)
- )
- bInvertNormalTextColor = false;
- }
- if( bInvertNormalTextColor
- && _ppbd.m_clrForceTextNormal == COLORREF(-1L)
- )
- _ppbd.m_clrForceTextNormal = RGB(255,255,255);
- if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
- _ppbd.m_clrForceTextDisabled = RGB(141,141,141);
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- }
- void CExtPaintManagerOffice2010_R2_Black::PaintPushButton(
- CDC & dc,
- CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPushButton( dc, _ppbd );
- return;
- }
- if( _ppbd.m_pHelperSrc != NULL
- && _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CButton) )
- )
- {
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- return;
- }
- bool bInvertNormalTextColor = true;
- if( _ppbd.m_bHover || _ppbd.m_bPushed || _ppbd.m_bPushedDropDown )
- bInvertNormalTextColor = false;
- else if( _ppbd.m_clrForceTextNormal == COLORREF(-1L) && _ppbd.m_pHelperSrc != NULL )
- {
- if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarButton) )
- && ( ! _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarMdiRightButton) ) )
- )
- {
- if( LPVOID(CExtPopupMenuWnd::g_pCombinedHelper) == LPVOID(_ppbd.m_pHelperSrc) )
- bInvertNormalTextColor = false;
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtBarButton) ) )
- {
- CExtToolControlBar * pToolBar = ((CExtBarButton*)_ppbd.m_pHelperSrc)->GetBar();
- ASSERT_VALID( pToolBar );
- if( ! pToolBar->IsKindOf( RUNTIME_CLASS(CExtMenuControlBar) ) )
- {
- if( pToolBar->m_pDockSite == NULL )
- {
- if( pToolBar->m_bForceBalloonGradientInDialogs )
- bInvertNormalTextColor = false;
- }
- else
- {
- if( ! pToolBar->m_bForceNoBalloonWhenRedockable )
- bInvertNormalTextColor = false;
- }
- }
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- else if( pToolBar->IsKindOf( RUNTIME_CLASS(CExtRibbonPage) ) )
- bInvertNormalTextColor = false;
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- }
- }
- else if( _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtPopupBaseWnd) )
- || _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtMenuControlBar) )
- #if (!defined __EXT_MFC_NO_DATE_PICKER)
- || _ppbd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtDatePickerWnd) )
- #endif // (!defined __EXT_MFC_NO_DATE_PICKER)
- )
- bInvertNormalTextColor = false;
- }
- if( bInvertNormalTextColor
- && _ppbd.m_clrForceTextNormal == COLORREF(-1L)
- )
- _ppbd.m_clrForceTextNormal = RGB(220,220,220);
- if( _ppbd.m_clrForceTextDisabled == COLORREF(-1L) )
- _ppbd.m_clrForceTextDisabled = RGB(141,141,141);
- CExtPaintManagerOffice2007_Impl::PaintPushButton( dc, _ppbd );
- }
- CSize CExtPaintManagerOffice2007_Impl::GetCheckButtonBoxSize(
- CDC & dc,
- CExtPaintManager::PAINTCHECKRADIOBUTTONDATA & _pcbd
- ) const
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return CExtPaintManagerXP::GetCheckButtonBoxSize( dc, _pcbd );
- CSize _sizeBox( 13, 13 );
- _sizeBox.cx = UiScalingDo( _sizeBox.cx, __EUIST_X );
- _sizeBox.cy = UiScalingDo( _sizeBox.cy, __EUIST_Y );
- return _sizeBox;
- }
- CSize CExtPaintManagerOffice2007_Impl::GetRadioButtonBoxSize(
- CDC & dc,
- CExtPaintManager::PAINTCHECKRADIOBUTTONDATA & _pcbd
- ) const
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return CExtPaintManagerXP::GetRadioButtonBoxSize( dc, _pcbd );
- return GetCheckButtonBoxSize( dc, _pcbd );
- }
- void CExtPaintManagerOffice2007_Impl::PaintCheckButtonBox(
- CDC & dc,
- CExtPaintManager::PAINTCHECKRADIOBUTTONDATA & _pcrbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _pcrbd.m_rcClient.IsRectEmpty() )
- return;
- if( _pcrbd.m_pHelperSrc == NULL )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintCheckButtonBox( dc, _pcrbd );
- return;
- }
- if( m_bmpArrStatesCheckBox.IsEmpty() )
- {
- CExtPaintManagerOffice2003::PaintCheckButtonBox( dc, _pcrbd );
- return;
- }
- INT nIndex = 0;
- switch( _pcrbd.m_eState )
- {
- case CExtPaintManager::BOX_UNCHECKED:
- nIndex = 0;
- break;
- case CExtPaintManager::BOX_MOUSE_HOVER_UNCHECKED:
- nIndex = 1;
- break;
- case CExtPaintManager::BOX_LDOWN_UNCHECKED:
- nIndex = 2;
- break;
- case CExtPaintManager::BOX_DISABLED_UNCHECKED:
- nIndex = 3;
- break;
- case CExtPaintManager::BOX_CHECKED:
- nIndex = 0 + 4;
- break;
- case CExtPaintManager::BOX_MOUSE_HOVER_CHECKED:
- nIndex = 1 + 4;
- break;
- case CExtPaintManager::BOX_LDOWN_CHECKED:
- nIndex = 2 + 4;
- break;
- case CExtPaintManager::BOX_DISABLED_CHECKED:
- nIndex = 3 + 4;
- break;
- case CExtPaintManager::BOX_INDETERMINATE:
- nIndex = 0 + 8;
- break;
- case CExtPaintManager::BOX_MOUSE_HOVER_INDETERMINATE:
- nIndex = 1 + 8;
- break;
- case CExtPaintManager::BOX_LDOWN_INDETERMINATE:
- nIndex = 2 + 8;
- break;
- case CExtPaintManager::BOX_DISABLED_INDETERMINATE:
- nIndex = 3 + 8;
- break;
- } // switch( _pcrbd.m_eState )
- CSize _sizeImgPart( 13, 13 ); // = GetCheckButtonBoxSize( dc, _pcrbd );
- CRect rcSrc( 0, 0, _sizeImgPart.cx, _sizeImgPart.cy );
- rcSrc.OffsetRect( 0, _sizeImgPart.cx * nIndex );
- int nOldStretchBltMode = ::GetStretchBltMode( dc.m_hDC );
- ::SetStretchBltMode( dc.m_hDC, ( g_PaintManager.m_bIsWinNT ) ? HALFTONE : COLORONCOLOR );
- m_bmpArrStatesCheckBox.AlphaBlend(
- dc.m_hDC,
- _pcrbd.m_rcBox.left, _pcrbd.m_rcBox.top, _pcrbd.m_rcBox.Width(), _pcrbd.m_rcBox.Height(),
- rcSrc.left, rcSrc.top, rcSrc.Width(), rcSrc.Height()
- );
- ::SetStretchBltMode( dc.m_hDC, nOldStretchBltMode );
- }
- void CExtPaintManagerOffice2007_Impl::PaintRadioButtonBox(
- CDC & dc,
- CExtPaintManager::PAINTCHECKRADIOBUTTONDATA & _pcrbd
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( _pcrbd.m_rcClient.IsRectEmpty() )
- return;
- if( _pcrbd.m_pHelperSrc == NULL )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintRadioButtonBox( dc, _pcrbd );
- return;
- }
- if( m_bmpArrStatesRadioButton.IsEmpty() )
- {
- CExtPaintManagerOffice2003::PaintRadioButtonBox( dc, _pcrbd );
- return;
- }
- INT nIndex = 0;
- switch( _pcrbd.m_eState )
- {
- case CExtPaintManager::BOX_UNCHECKED:
- nIndex = 0;
- break;
- case CExtPaintManager::BOX_MOUSE_HOVER_UNCHECKED:
- nIndex = 1;
- break;
- case CExtPaintManager::BOX_LDOWN_UNCHECKED:
- nIndex = 2;
- break;
- case CExtPaintManager::BOX_DISABLED_UNCHECKED:
- nIndex = 3;
- break;
- case CExtPaintManager::BOX_CHECKED:
- nIndex = 0 + 4;
- break;
- case CExtPaintManager::BOX_MOUSE_HOVER_CHECKED:
- nIndex = 1 + 4;
- break;
- case CExtPaintManager::BOX_LDOWN_CHECKED:
- nIndex = 2 + 4;
- break;
- case CExtPaintManager::BOX_DISABLED_CHECKED:
- nIndex = 3 + 4;
- break;
- } // switch( _pcrbd.m_eState )
- CSize _sizeImgPart( 13, 13 ); // = GetRadioButtonBoxSize( dc, _pcrbd );
- CRect rcSrc( 0, 0, _sizeImgPart.cx, _sizeImgPart.cy );
- rcSrc.OffsetRect( 0, _sizeImgPart.cx * nIndex );
- int nOldStretchBltMode = ::GetStretchBltMode( dc.m_hDC );
- ::SetStretchBltMode( dc.m_hDC, ( g_PaintManager.m_bIsWinNT ) ? HALFTONE : COLORONCOLOR );
- m_bmpArrStatesRadioButton.AlphaBlend(
- dc.m_hDC,
- _pcrbd.m_rcBox.left, _pcrbd.m_rcBox.top, _pcrbd.m_rcBox.Width(), _pcrbd.m_rcBox.Height(),
- rcSrc.left, rcSrc.top, rcSrc.Width(), rcSrc.Height()
- );
- ::SetStretchBltMode( dc.m_hDC, nOldStretchBltMode );
- }
- void CExtPaintManagerOffice2007_Impl::PaintMenuItemLeftAreaMarginXP(
- CDC & dc,
- CExtPaintManager::PAINTMENUITEMDATA & _pmid,
- const RECT & rcFillLeftPart,
- const RECT & rcFillRightPart
- )
- {
- ASSERT_VALID( this );
- if( _pmid.m_bForceNoLeftGradient )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintMenuItemLeftAreaMarginXP( dc, _pmid, rcFillLeftPart, rcFillRightPart );
- return;
- }
- if( m_clrMenuItemLeftAreaMarginL != COLORREF(-1L) )
- dc.FillSolidRect(
- rcFillLeftPart.right - 1,
- rcFillLeftPart.top,
- 1,
- rcFillLeftPart.bottom - rcFillLeftPart.top,
- m_clrMenuItemLeftAreaMarginL
- );
- if( m_clrMenuItemLeftAreaMarginR != COLORREF(-1L) )
- dc.FillSolidRect(
- rcFillLeftPart.right,
- rcFillLeftPart.top,
- 1,
- rcFillLeftPart.bottom - rcFillLeftPart.top,
- m_clrMenuItemLeftAreaMarginR
- );
- }
- bool CExtPaintManagerOffice2007_Impl::PaintMenuItemBackgroundXP(
- CDC & dc,
- CExtPaintManager::PAINTMENUITEMDATA & _pmid,
- const RECT & rcSelectionArea
- )
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return CExtPaintManagerXP::PaintMenuItemBackgroundXP( dc, _pmid, rcSelectionArea );
- bool bRTL = false;
- CExtPopupMenuWnd * pPopup = NULL;
- if( _pmid.m_pHelperSrc != NULL )
- {
- ASSERT_VALID( _pmid.m_pHelperSrc );
- pPopup = DYNAMIC_DOWNCAST( CExtPopupMenuWnd, _pmid.m_pHelperSrc );
- if( pPopup != NULL )
- bRTL = pPopup->OnQueryLayoutRTL();
- }
- if( (! m_bThemedMenuItemsEverywhere )
- && pPopup != NULL
- && ( pPopup->TrackFlagsGet() & TPMX_RIBBON_MODE ) == 0
- )
- return false;
- if( m_bmpMenuItemLargeLeft.IsEmpty()
- || m_bmpMenuItemLargeRight.IsEmpty()
- || m_bmpMenuItemSmallLeft.IsEmpty()
- || m_bmpMenuItemSmallRight.IsEmpty()
- || m_bmpMenuArrow.IsEmpty()
- )
- return CExtPaintManagerOffice2003::PaintMenuItemBackgroundXP( dc, _pmid, rcSelectionArea );
- bool bSmall = ( ! _pmid.m_bBigAccent );
- INT nMenuGlyphItemHeight = bSmall ? m_nMenuGlyphItemHeightSmall : m_nMenuGlyphItemHeightLarge;
- CExtBitmap & _bmpLeft = bSmall ? m_bmpMenuItemSmallLeft : m_bmpMenuItemLargeLeft;
- CExtBitmap & _bmpRight = bSmall ? m_bmpMenuItemSmallRight : m_bmpMenuItemLargeRight;
- CRect rcPaddingLeft = bSmall ? m_rcMenuItemPaddingSmallLeft : m_rcMenuItemPaddingLargeLeft;
- CRect rcPaddingRight = bSmall ? m_rcMenuItemPaddingSmallRight : m_rcMenuItemPaddingLargeRight;
- CSize _sizeSrcLeft = _bmpLeft.GetSize(), _sizeSrcRight = _bmpRight.GetSize();
- CRect rcSrcLeft( 0, 0, _sizeSrcLeft.cx, nMenuGlyphItemHeight ), rcSrcRight( 0, 0, _sizeSrcRight.cx, nMenuGlyphItemHeight );
- CRect rcDstLeft = rcSelectionArea, rcDstRight = rcSelectionArea;
- if( bRTL )
- rcDstLeft.right = rcDstRight.left = rcDstRight.left + __EXT_MENU_POPUP_ARROW_AREA_DX;
- else
- rcDstLeft.right = rcDstRight.left = rcDstRight.right - __EXT_MENU_POPUP_ARROW_AREA_DX;
- bool bR1 = IsKindOf( RUNTIME_CLASS( CExtPaintManagerOffice2007_R1 ) ) ? true : false;
- INT nImageIndexLeft = ( _pmid.m_bSelected ) ? ( bR1 ? 2 : 1 ) : 0;
- INT nImageIndexRight = nImageIndexLeft;
- if( ! _pmid.m_bSeparatedDropDown )
- {
- rcSrcLeft.right -= rcPaddingLeft.right;
- rcPaddingLeft.right = 0;
- rcSrcRight.left += rcPaddingRight.left;
- rcPaddingRight.left = 0;
- }
- else
- {
- if( _pmid.m_bSelected )
- {
- if( bR1 )
- {
- if( _pmid.m_bHelperPopupDropped )
- nImageIndexRight = 1;
- }
- else
- {
- if( _pmid.m_bHelperPopupDropped )
- nImageIndexLeft = 2;
- else
- nImageIndexRight = 2;
- }
- }
- }
- rcSrcLeft.OffsetRect( 0, nImageIndexLeft*nMenuGlyphItemHeight );
- rcSrcRight.OffsetRect( 0, nImageIndexRight*nMenuGlyphItemHeight );
- _bmpLeft.AlphaBlendSkinParts(
- dc.m_hDC,
- rcDstLeft,
- rcSrcLeft,
- rcPaddingLeft,
- CExtBitmap::__EDM_STRETCH,
- true,
- false
- );
- _bmpRight.AlphaBlendSkinParts(
- dc.m_hDC,
- rcDstRight,
- rcSrcRight,
- rcPaddingRight,
- CExtBitmap::__EDM_STRETCH,
- true,
- false
- );
- if( _pmid.m_bPopup )
- {
- CExtBitmap _bmpBufferRTL;
- if( bRTL )
- {
- _bmpBufferRTL = m_bmpMenuArrow;
- _bmpBufferRTL.FlipHorizontal();
- }
- CExtBitmap * pBmpTarget = bRTL ? (&_bmpBufferRTL) : (&m_bmpMenuArrow);
- CSize _sizeBmpArrow = pBmpTarget->GetSize();
- CRect rcTarget = bRTL ? rcDstLeft : rcDstRight;
- CRect rcDstArrow( rcTarget.TopLeft(), _sizeBmpArrow );
- rcDstArrow.OffsetRect(
- ( rcTarget.Width() - _sizeBmpArrow.cx ) / 2,
- ( rcTarget.Height() - _sizeBmpArrow.cy ) / 2
- );
- pBmpTarget->CExtBitmap::AlphaBlend(
- dc.m_hDC,
- rcDstArrow
- );
- }
- return true;
- }
- bool CExtPaintManagerOffice2007_Impl::PaintMenuItemCheckMarkAreaXP(
- CDC & dc,
- CExtPaintManager::PAINTMENUITEMDATA & _pmid,
- const RECT & rcCheckMarkArea,
- CExtPaintManagerXP::e_CheckMarkAreaTypeXP eCMATXP
- )
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return CExtPaintManagerXP::PaintMenuItemCheckMarkAreaXP( dc, _pmid, rcCheckMarkArea, eCMATXP );
- if( m_bmpMenuCheckAreaChecked.IsEmpty()
- || m_bmpMenuCheckAreaUnchecked.IsEmpty()
- )
- return CExtPaintManagerOffice2003::PaintMenuItemCheckMarkAreaXP( dc, _pmid, rcCheckMarkArea, eCMATXP );
- int nIndex = _pmid.m_bEnabled ? 0 : 1;
- bool bChecked = ( eCMATXP == __ECMATXP_EXTRA_MARK_CHECKED ) ? true : false;
- CExtBitmap & bmp = bChecked ? m_bmpMenuCheckAreaChecked : m_bmpMenuCheckAreaUnchecked;
- CSize _size = bChecked ? m_sizeMenuCheckAreaChecked : m_sizeMenuCheckAreaUnchecked;
- CRect rcSrc( 0, 0, _size.cx, _size.cy );
- rcSrc.OffsetRect( 0, _size.cy * nIndex );
- bmp.AlphaBlendSkinParts(
- dc.m_hDC,
- rcCheckMarkArea,
- rcSrc,
- bChecked ? m_arrRectMenuCheckAreaCheckedPadding[nIndex] : m_arrRectMenuCheckAreaUncheckedPadding[nIndex],
- CExtBitmap::__EDM_CENTER,
- true,
- true,
- BYTE( _pmid.m_bIndeterminate ? 0x040 : 0x0FF )
- );
- return true;
- }
- void CExtPaintManagerOffice2007_Impl::PaintMenuScrollButton(
- CDC & dc,
- bool bHover,
- bool bPushed,
- bool bTopButton,
- const RECT & rcScrollButton,
- CObject * pHelperSrc,
- LPARAM lParam // = 0L
- )
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintMenuScrollButton( dc, bHover, bPushed, bTopButton, rcScrollButton, pHelperSrc, lParam );
- return;
- }
- //bool bTransparentBk = false;
- bPushed = bPushed || bHover;
- if( bPushed )
- {
- PAINTMENUITEMDATA _pmid; // fake
- if( PaintMenuItemSelectionAreaXP( dc, _pmid, rcScrollButton ) )
- {
- bPushed = bHover = false;
- //bTransparentBk = true;
- }
- }
- // CExtPaintManagerOffice2003::PaintMenuScrollButton(
- // dc,
- // bHover,
- // bPushed,
- // bTopButton,
- // rcScrollButton,
- // pHelperSrc,
- // lParam
- // );
- CExtPaintManager::PAINTPUSHBUTTONDATA _ppbd(
- pHelperSrc,
- true,
- rcScrollButton,
- bTopButton ? _T("t") : _T("u"), // up arrow / down arrow
- NULL,
- true,
- false, // bHover,
- bPushed,
- false,
- true,true,false,false,
- __ALIGN_HORIZ_CENTER | __ALIGN_VERT_CENTER,
- (HFONT)m_FontMarlett.GetSafeHandle(),
- false,
- 0,
- true // bTransparentBk
- );
- _ppbd.m_lParam = lParam;
- PaintPushButton( dc, _ppbd );
- }
- #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorItem(
- CDC & dc,
- const CRect & rcItem,
- __EXT_MFC_SAFE_LPCTSTR strCaption,
- CExtCmdIcon * pIcon,
- bool bExpanded,
- bool bSelected,
- bool bPushed,
- bool bHover
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcItem) )
- return;
- if( ::GetDeviceCaps( dc.m_hDC,BITSPIXEL) <= 8 || IsHighContrast() )
- {
- CExtPaintManagerOffice2003::PaintPageNavigatorItem( dc, rcItem, strCaption, pIcon, bExpanded, bSelected, bPushed, bHover );
- return;
- }
- COLORREF clrForceText = COLORREF(-1L);
- INT nPnIndex = INT(ePn_Normal);
- if( bSelected )
- nPnIndex = bHover ? INT(ePn_SelectedHover) : INT(ePn_Selected);
- else if( bPushed )
- nPnIndex = INT( ePn_Pressed );
- else if( bHover )
- nPnIndex = INT( ePn_Hover );
- const CExtBitmap * pArrBmp = bExpanded ? m_arrBmpPnItemExpanded : m_arrBmpPnItemCollapsed;
- const CExtBitmap & _bmp = pArrBmp[nPnIndex];
- if( ! _bmp.IsEmpty() )
- {
- CRect _rcItem = rcItem;
- if( ! bExpanded )
- _rcItem.top --;
- else
- _rcItem.bottom --;
- const CRect * pArrPadding = bExpanded ? m_arrRcPnItemPaddingExpanded : m_arrRcPnItemPaddingCollapsed;
- const CRect & _rcPadding = pArrPadding[ nPnIndex ];
- if( ! bExpanded )
- _rcItem.bottom --;
- _bmp.AlphaBlendSkinParts( dc.m_hDC, _rcItem, _rcPadding, CExtBitmap::__EDM_STRETCH, true, true );
- if( bExpanded )
- {
- clrForceText = m_arrClrPnItemTextBmpVer[nPnIndex];
- // paint 1px borders at left/right
- dc.FillSolidRect( _rcItem.left, _rcItem.top, 1, _rcItem.Height(), GetColor( _2003CLR_PN_BORDER, this ) );
- dc.FillSolidRect( _rcItem.right - 1, _rcItem.top, 1, _rcItem.Height(), GetColor( _2003CLR_PN_BORDER, this ) );
- }
- }
- else
- {
- // border
- if( bExpanded )
- {
- CBrush brBorder( GetColor( _2003CLR_PN_BORDER, this ) );
- dc.FrameRect( &rcItem, &brBorder );
- }
- CRect rcItemInner( rcItem );
- if( bExpanded )
- rcItemInner.DeflateRect( 1, 1 );
- COLORREF * pArrClrSchema = m_arrClrPnCaptNormal;
- if( ( bPushed || bSelected ) && bHover )
- pArrClrSchema = m_arrClrPnCaptPressed;
- else if( bPushed || bSelected )
- pArrClrSchema = m_arrClrPnCaptActive;
- else if( bHover )
- pArrClrSchema = m_arrClrPnCaptHover;
- CRect rcTop = rcItemInner, rcBottom = rcItemInner;
- rcTop.bottom = rcBottom.top =rcTop.top + ::MulDiv( rcTop.Height(), 2, 5 );
- stat_PaintGradientRect( dc, rcTop, pArrClrSchema[1], pArrClrSchema[0], true );
- stat_PaintGradientRect( dc, rcBottom, pArrClrSchema[3], pArrClrSchema[2], true );
- }
- PaintPageNavigatorCaption( dc, rcItem, strCaption, pIcon, bExpanded, bSelected, bPushed, bHover, false, clrForceText );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorItemCaption(
- CDC & dc,
- const CRect & rcCaption,
- __EXT_MFC_SAFE_LPCTSTR strCaption
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcCaption) )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorItemCaption( dc, rcCaption, strCaption );
- return;
- }
- CRect rc( rcCaption );
- dc.FillSolidRect( &rc, RGB(255,255,255) );
- CRect rcBottomLine( rc );
- rcBottomLine.top = rcBottomLine.bottom - 1;
- rc.bottom -= 1;
- dc.FillSolidRect( &rcBottomLine, GetColor( _2003CLR_PN_BORDER, this ) );
- rc.top += 1;
- rc.left += 1;
- if( ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) > 8 )
- stat_PaintGradientRect( dc, &rc, GetColor( _2003CLR_PN_GRIPPER_DARK, this ), GetColor( _2003CLR_PN_GRIPPER_LIGHT, this ), true );
- else
- dc.FillSolidRect( &rc, GetColor( COLOR_3DSHADOW, this ) );
- PaintPageNavigatorItemCaptionText( dc, rc, strCaption );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorCaptionText(
- CDC & dc,
- const CRect & rcItem,
- __EXT_MFC_SAFE_LPCTSTR strCaption,
- bool bSelected,
- bool bPushed,
- bool bHover,
- bool bAllowInvertTextColor, // = true
- COLORREF clrForceText // = COLORREF(-1L)
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcItem) )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorCaptionText( dc, rcItem, strCaption, bSelected, bPushed, bHover, bAllowInvertTextColor );
- return;
- }
- LOGFONT lf = { sizeof(LOGFONT) };
- VERIFY( ::SystemParametersInfo( SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, 0 ) );
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Arial") );
- lf.lfWeight = FW_BOLD;
- CFont font;
- font.CreateFontIndirect(&lf);
- CFont * pOldFont = dc.SelectObject( &font );
- COLORREF clrOldText =
- dc.SetTextColor(
- ( clrForceText != COLORREF(-1L) )
- ? clrForceText
- : ( ( bPushed || bSelected ) ? m_arrClrPnItemText[0] : m_arrClrPnItemText[1] )
- );
- PaintPageNavigatorCaptionTextImpl( dc, rcItem, strCaption );
- dc.SetTextColor( clrOldText );
- dc.SelectObject( pOldFont );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorItemPaneCaptionText(
- CDC & dc,
- const CRect & rcCaption,
- __EXT_MFC_SAFE_LPCTSTR strCaption
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcCaption) )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorItemPaneCaptionText( dc, rcCaption, strCaption );
- return;
- }
- if( strCaption == NULL )
- return;
- // caption text
- LOGFONT lf = { sizeof(LOGFONT) };
- VERIFY( ::SystemParametersInfo( SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, 0 ) );
- if( ! m_strPnPaneCaptCustomFontFaceName.IsEmpty() )
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, LPCTSTR(m_strPnPaneCaptCustomFontFaceName) );
- lf.lfWeight = m_bPnPaneCaptFontBold ? FW_BOLD : FW_NORMAL;
- CFont font;
- font.CreateFontIndirect( &lf );
- CFont * pOldFont = dc.SelectObject( &font );
- COLORREF clrOldText = dc.SetTextColor( m_clrPnCaptText );
- PaintPageNavigatorItemPaneCaptionTextImpl( dc, rcCaption, strCaption );
- dc.SetTextColor( clrOldText );
- dc.SelectObject( pOldFont );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorItemPaneCaption(
- CDC & dc,
- const CRect & rcCaption,
- __EXT_MFC_SAFE_LPCTSTR strCaption,
- bool bHover,
- bool bPressed,
- bool bExpandable,
- bool bExpanded,
- bool bDrawTopLine // = true
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcCaption) )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorItemPaneCaption( dc, rcCaption, strCaption, bHover, bPressed, bExpandable, bExpanded, bDrawTopLine );
- return;
- }
- CRect rc( rcCaption );
- dc.FillSolidRect( &rc, RGB(255,255,255) );
- if( bDrawTopLine )
- {
- CRect rcTopLine( rc );
- rc.top += 1;
- rcTopLine.bottom = rcTopLine.top + 1;
- dc.FillSolidRect( &rcTopLine, GetColor( _2003CLR_PN_BORDER, this ) );
- }
- CRect rcBottomLine( rc );
- rcBottomLine.top = rcBottomLine.bottom - 1;
- rc.bottom -= 1;
- dc.FillSolidRect( &rcBottomLine, GetColor( _2003CLR_PN_PANE_CAPTION_BOTTOM_LINE, this ) );
- rc.top += 1;
- rc.left += 1;
- if( ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) > 8 )
- stat_PaintGradientRect2steps(
- dc,
- &rc,
- GetColor( bHover ? _2003CLR_PN_PANE_CAPTION_HOVER_DARK : _2003CLR_PN_PANE_CAPTION_DARK, this ),
- GetColor( bHover ? _2003CLR_PN_PANE_CAPTION_HOVER_LIGHT : _2003CLR_PN_PANE_CAPTION_LIGHT, this ),
- GetColor( bHover ? _2003CLR_PN_PANE_CAPTION_HOVER_DARK : _2003CLR_PN_PANE_CAPTION_DARK, this ),
- false,
- 1,
- 2
- );
- else
- dc.FillSolidRect( &rc, GetColor( COLOR_3DSHADOW, this ) );
- CRect rcText( rc );
- if( bExpandable )
- {
- CExtPaintManager::glyph_t * pGlyph =
- CExtPaintManager::g_DockingCaptionGlyphs[
- bExpanded ? CExtPaintManager::__DCBT_PN_CAPTION_EXPANDED : CExtPaintManager::__DCBT_PN_CAPTION_COLLAPSED
- ];
- ASSERT( pGlyph != NULL );
- COLORREF ColorValues[2] =
- {
- RGB(0,0,0),
- GetColor( COLOR_3DDKSHADOW, this )
- };
- CRect rcExpandButton( rcText );
- rcExpandButton.right -= 6;
- rcExpandButton.left = rcExpandButton.right - pGlyph->Size().cx - 1*2;
- PaintGlyphCentered( dc, rcExpandButton, *pGlyph, ColorValues );
- rcText.right = rcExpandButton.left;
- }
- PaintPageNavigatorItemPaneCaptionText( dc, rcText, strCaption );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorConfigButton(
- CDC & dc,
- const CRect & rcItem,
- bool bPushed,
- bool bHover
- )
- {
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( ! dc.RectVisible(&rcItem) )
- return;
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorConfigButton( dc, rcItem, bPushed, bHover );
- return;
- }
- CRect rc( rcItem );
- CExtPaintManager::glyph_t * pGlyph = CExtPaintManager::g_DockingCaptionGlyphs[ CExtPaintManager::__DCBT_PN_CONFIG_BUTTON_2007 ];
- ASSERT( pGlyph != NULL );
- COLORREF ColorValues1[2] = { RGB(0,0,0), GetColor( COLOR_WINDOW, this ) };
- PaintGlyphCentered( dc, rc, *pGlyph, ColorValues1 );
- rc.OffsetRect(0,-1);
- COLORREF ColorValues2[2] = { RGB(0,0,0), m_clrPnConfigButton };
- PaintGlyphCentered( dc, rc, *pGlyph, ColorValues2 );
- }
- void CExtPaintManagerOffice2007_Impl::PaintPageNavigatorSplitter(
- CDC & dc,
- const CRect & rcSplitter,
- bool bDrawDots // = true
- )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorSplitter( dc, rcSplitter, bDrawDots );
- return;
- }
- if( ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) > 8 )
- {
- stat_PaintGradientRect( dc, &rcSplitter, m_arrClrPnSplitter[1], m_arrClrPnSplitter[0], true );
- dc.FillSolidRect( rcSplitter.left, rcSplitter.top, rcSplitter.Width(), 1, GetColor( _2003CLR_PN_BORDER, this ) );
- if( bDrawDots )
- PaintPageNavigatorSplitterDots( dc, rcSplitter, 0 );
- }
- else
- CExtPaintManagerOffice2003::PaintPageNavigatorSplitter( dc, rcSplitter, true );
- }
- void CExtPaintManagerOffice2010_Impl::PaintPageNavigatorSplitter(
- CDC & dc,
- const CRect & rcSplitter,
- bool bDrawDots // = true
- )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( this );
- ASSERT( dc.GetSafeHdc() != NULL );
- if( IsHighContrast() )
- {
- CExtPaintManagerXP::PaintPageNavigatorSplitter( dc, rcSplitter, bDrawDots );
- return;
- }
- if( ::GetDeviceCaps( dc.m_hDC, BITSPIXEL ) > 8 )
- {
- stat_PaintGradientRect( dc, &rcSplitter, m_arrClrPnSplitter[1], m_arrClrPnSplitter[0], true );
- dc.FillSolidRect( rcSplitter.left, rcSplitter.top, rcSplitter.Width(), 1, GetColor( _2003CLR_PN_BORDER, this ) );
- dc.FillSolidRect( rcSplitter.left, rcSplitter.bottom-1, rcSplitter.Width(), 1, GetColor( _2003CLR_PN_BORDER, this ) );
- if( bDrawDots )
- PaintPageNavigatorSplitterDots( dc, rcSplitter, 0 );
- }
- else
- CExtPaintManagerOffice2003::PaintPageNavigatorSplitter( dc, rcSplitter, true );
- }
- #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- CExtPaintManager::SCROLLBARSKINDATA * CExtPaintManagerOffice2007_Impl::ScrollBar_GetSkinData(
- bool bHorzBar,
- CObject * pHelperSrc,
- LPARAM lParam, // = 0L
- bool bLightAccent // = true
- )
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return
- CExtPaintManagerXP::ScrollBar_GetSkinData(
- bHorzBar,
- pHelperSrc,
- lParam,
- bLightAccent
- );
-
- if( pHelperSrc != NULL )
- {
- ASSERT_VALID( pHelperSrc );
- if( pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtZoomScrollBar ) ) )
- {
- switch( ((CExtZoomScrollBar*)pHelperSrc)->m_eSO )
- {
- case CExtScrollBar::__ESO_TOP:
- return (&m_SbSkinDataT_Zoom);
- case CExtScrollBar::__ESO_BOTTOM:
- return (&m_SbSkinDataB_Zoom);
- case CExtScrollBar::__ESO_LEFT:
- return (&m_SbSkinDataL_Zoom);
- case CExtScrollBar::__ESO_RIGHT:
- return (&m_SbSkinDataR_Zoom);
- default:
- return bHorzBar ? (&m_SbSkinDataT_Zoom) : (&m_SbSkinDataL_Zoom);
- } // switch( ((CExtZoomScrollBar*)pHelperSrc)->m_eSO )
- } // if( pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtZoomScrollBar ) ) )
- } // if( pHelperSrc != NULL )
- if( bLightAccent )
- return bHorzBar ? (&m_SbSkinDataH_Light) : (&m_SbSkinDataV_Light);
- else
- return bHorzBar ? (&m_SbSkinDataH_Dark) : (&m_SbSkinDataV_Dark);
- }
- bool CExtPaintManagerOffice2007_Impl::ScrollBar_GetMetrics(
- INT * p_nHorzBarHeight, // = NULL
- INT * p_nVertBarWidth, // = NULL
- INT * p_nHorzButtonWidth, // = NULL
- INT * p_nVertButtonHeight, // = NULL
- INT * p_nHorzThumbMinWidth, // = NULL
- INT * p_nVertThumbMinHeight, // = NULL
- CObject * pHelperSrc, // = NULL
- LPARAM lParam // = 0L
- ) const
- {
- ASSERT_VALID( this );
- if( IsHighContrast() )
- return
- CExtPaintManagerXP::ScrollBar_GetMetrics(
- p_nHorzBarHeight,
- p_nVertBarWidth,
- p_nHorzButtonWidth,
- p_nVertButtonHeight,
- p_nHorzThumbMinWidth,
- p_nVertThumbMinHeight,
- pHelperSrc,
- lParam
- );
- if( ( p_nHorzBarHeight != NULL
- || p_nVertBarWidth != NULL
- || p_nHorzButtonWidth != NULL
- || p_nVertButtonHeight != NULL
- || p_nHorzThumbMinWidth != NULL
- || p_nVertThumbMinHeight != NULL
- )
- && pHelperSrc != NULL
- )
- {
- ASSERT_VALID( pHelperSrc );
- CExtZoomScrollBar * pZoomScrollBar = DYNAMIC_DOWNCAST( CExtZoomScrollBar, pHelperSrc );
- if( pZoomScrollBar != NULL )
- {
- if( p_nHorzBarHeight != NULL )
- {
- (*p_nHorzBarHeight) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_BUTTON_DOWN)].GetSize().cy;
- if( (*p_nHorzBarHeight) <= 0 )
- return false;
- else
- (*p_nHorzBarHeight) += 2;
- }
- if( p_nVertBarWidth != NULL )
- {
- (*p_nVertBarWidth) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_BUTTON_DOWN)].GetSize().cx;
- if( (*p_nVertBarWidth) <= 0 )
- return false;
- else
- (*p_nVertBarWidth) += 2;
- }
- if( p_nHorzButtonWidth != NULL )
- {
- (*p_nHorzButtonWidth) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_BUTTON_DOWN)].GetSize().cx;
- if( (*p_nHorzButtonWidth) <= 0 )
- return false;
- }
- if( p_nVertButtonHeight != NULL )
- {
- (*p_nVertButtonHeight) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_BUTTON_DOWN)].GetSize().cy;
- if( (*p_nVertButtonHeight) <= 0 )
- return false;
- }
- if( p_nHorzThumbMinWidth != NULL )
- {
- (*p_nHorzThumbMinWidth) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_THUMB)].GetSize().cx;
- if( (*p_nHorzThumbMinWidth) <= 0 )
- return false;
- }
- if( p_nVertThumbMinHeight != NULL )
- {
- (*p_nVertThumbMinHeight) = m_SbSkinDataT_Zoom.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_THUMB)].GetSize().cy;
- if( (*p_nVertThumbMinHeight) <= 0 )
- return false;
- }
- return true;
- } // if( pZoomScrollBar != NULL )
- }
- return
- CExtPaintManagerOffice2003::ScrollBar_GetMetrics(
- p_nHorzBarHeight,
- p_nVertBarWidth,
- p_nHorzButtonWidth,
- p_nVertButtonHeight,
- p_nHorzThumbMinWidth,
- p_nVertThumbMinHeight,
- pHelperSrc,
- lParam
- );
- }
- CExtPaintManagerOffice2007_R1::CExtPaintManagerOffice2007_R1()
- {
- m_clrFillHint = RGB(205,205,205);
- m_clrAccentHint = RGB(156,193,234);
- m_clrIconAlphaColor = RGB(114,121,138);
- m_clrAdvTipGradientBottom = RGB(229,229,240);
- m_clrDCA1 = RGB(172,180,198);
- m_clrDCA2 = RGB(113,125,152);
- m_clrDCA3 = RGB(132,141,166);
- m_bDocumentClientAreaBkgndR2 = false;
- VERIFY( m_bmpDCA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_DCA_R1) ) );
- m_bmpDCA.PreMultiplyRGBChannels();
- m_bmpDCA.PreMultipliedRGBChannelsSet( true );
- m_bUseNcFrameBmpForDockerBkgnd = true;
- m_clrCustomDropDownGlyphEnabled = RGB(0,0,0);
- m_clrCustomDropDownGlyphDisabled = RGB(141,141,141);
- m_clrDockingFrameDark = m_clrFloatingToolbarGripperSolid = RGB(83,96,125);
- m_clrDockingFrameCaptionTextActive = RGB(51,51,51);
- m_clrDockingFrameCaptionTextInactive = RGB(51,51,51);
- m_clrDockingFrameCaptionTextFloatingFixed = RGB(255,255,255);
- m_clrDockingCaptionShapeFixedNormal = RGB(255,255,255);
- m_rcNcFrameBordersActive.SetRect( 3, 4, 3, 2 );
- m_rcNcFrameBordersInactive.SetRect( 3, 4, 3, 2 );
- m_nCaptionHeightActive = m_nCaptionHeightInactive = 26;
- VERIFY( m_bmpNcFrameActive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_ACTIVE_R1) ) );
- VERIFY( m_bmpNcFrameInactive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_INACTIVE_R1) ) );
- VERIFY( m_bmpNcFrameActive.Make32() );
- VERIFY( m_bmpNcFrameInactive.Make32() );
- m_bmpNcFrameActive.AlphaColor( m_clrTransparentNcFrameActive, RGB(0,0,0), 0 );
- m_bmpNcFrameInactive.AlphaColor( m_clrTransparentNcFrameInactive, RGB(0,0,0), 0 );
- m_clrNcFrameTextActive = RGB(69,69,69); // = RGB(123,123,123);
- m_clrNcFrameTextInactive = RGB(163,163,163); // = RGB(183,183,183);
- m_bmpNcFrameActive.PreMultiplyRGBChannels();
- m_bmpNcFrameActive.PreMultipliedRGBChannelsSet( true );
- m_bmpNcFrameInactive.PreMultiplyRGBChannels();
- m_bmpNcFrameInactive.PreMultipliedRGBChannelsSet( true );
- m_sizeNcButtonShapeInArr.cx = m_sizeNcButtonShapeInArr.cy = 21;
- m_nNcBtnIdxNormalActive = m_nNcBtnIdxNormalInactive = 0;
- VERIFY( m_bmpNcButtonBkHover.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_HOVER_R1) ) );
- VERIFY( m_bmpNcButtonBkPressed.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_PRESSED_R1) ) );
- VERIFY( m_bmpNcButtonBkHover.Make32() );
- VERIFY( m_bmpNcButtonBkPressed.Make32() );
- m_bmpNcButtonBkHover.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkPressed.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkHover.PreMultiplyRGBChannels();
- m_bmpNcButtonBkHover.PreMultipliedRGBChannelsSet( true );
- m_bmpNcButtonBkPressed.PreMultiplyRGBChannels();
- m_bmpNcButtonBkPressed.PreMultipliedRGBChannelsSet( true );
-
- VERIFY( m_bmpArrNcButtonsHelp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_HELP_R1) ) );
- m_bmpArrNcButtonsHelp.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsHelp.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsClose.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_CLOSE_R1) ) );
- m_bmpArrNcButtonsClose.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsClose.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsMaximize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MAXIMIZE_R1) ) );
- m_bmpArrNcButtonsMaximize.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsMaximize.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsRestore.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_RESTORE_R1) ) );
- m_bmpArrNcButtonsRestore.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsRestore.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsMinimize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MINIMIZE_R1) ) );
- m_bmpArrNcButtonsMinimize.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsMinimize.PreMultipliedRGBChannelsSet( true );
- #if (!defined __EXT_MFC_NO_STATUSBAR)
- m_rcStatusBkPadding.SetRect( 0, 2, 0, 1 );
- VERIFY( m_bmpStatusBkLight.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_LIGHT_R1) ) );
- VERIFY( m_bmpStatusBkDark.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_DARK_R1) ) );
- m_rcStatusSeparatorPadding.SetRect( 0, 2, 0, 1 );
- VERIFY( m_bmpStatusSeparator.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_SEPARATOR_R1) ) );
- #endif // (!defined __EXT_MFC_NO_STATUSBAR)
- #if (!defined __EXT_MFC_NO_TAB_CTRL)
- m_clrTabTextNormal = m_clrTabTextSelected = RGB(8,32,100);
- m_nIdxTabShapeHover = 0;
- m_nIdxTabShapePressed = 1;
- m_nIdxTabShapeSelected = 2;
- m_nIdxTabShapeSelectedHover = 3;
- m_arrSizeTabShape[__ETSOI_TOP].cx
- = m_arrSizeTabShape[__ETSOI_BOTTOM].cx
- = m_arrSizeTabShape[__ETSOI_LEFT].cy
- = m_arrSizeTabShape[__ETSOI_RIGHT].cy
- = 72;
- m_arrSizeTabShape[__ETSOI_TOP].cy
- = m_arrSizeTabShape[__ETSOI_BOTTOM].cy
- = m_arrSizeTabShape[__ETSOI_LEFT].cx
- = m_arrSizeTabShape[__ETSOI_RIGHT].cx
- = 25;
- m_arrRectTabShapePadding[__ETSOI_TOP].SetRect( 6, 3, 6, 3 );
- m_arrRectTabShapePadding[__ETSOI_BOTTOM].SetRect( 6, 3, 6, 3 );
- m_arrRectTabShapePadding[__ETSOI_LEFT].SetRect( 3, 6, 3, 6 );
- m_arrRectTabShapePadding[__ETSOI_RIGHT].SetRect( 3, 6, 3, 6 );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_TOP].LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_TAB_SHAPE_ARR_R1 )
- )
- );
- VERIFY( m_arrBmpTabShapeNormal[__ETSOI_TOP].Make32() );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_BOTTOM].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 180,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_LEFT].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 270,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_RIGHT].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 90,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- m_arrSizeTabSeparator[__ETSOI_TOP].cx
- = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cx
- = m_arrSizeTabSeparator[__ETSOI_LEFT].cy
- = m_arrSizeTabSeparator[__ETSOI_RIGHT].cy
- = 1;
- m_arrSizeTabSeparator[__ETSOI_TOP].cy
- = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cy
- = m_arrSizeTabSeparator[__ETSOI_LEFT].cx
- = m_arrSizeTabSeparator[__ETSOI_RIGHT].cx
- = 25;
- m_arrRectTabSeparatorPadding[__ETSOI_TOP].SetRect( 0, 2, 0, 2 );
- m_arrRectTabSeparatorPadding[__ETSOI_BOTTOM].SetRect( 0, 2, 0, 2 );
- m_arrRectTabSeparatorPadding[__ETSOI_LEFT].SetRect( 2, 0, 2, 0 );
- m_arrRectTabSeparatorPadding[__ETSOI_RIGHT].SetRect( 2, 0, 2, 0 );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_TOP].LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_TAB_SEPARATOR_R1 )
- )
- );
- VERIFY( m_arrBmpTabSeparator[__ETSOI_TOP].Make32() );
- m_arrBmpTabSeparator[__ETSOI_TOP].PreMultiplyRGBChannels();
- m_arrBmpTabSeparator[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_BOTTOM].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 180,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_LEFT].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 270,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_RIGHT].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 90,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- #endif // (!defined __EXT_MFC_NO_TAB_CTRL)
- #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- m_clrPnCaptText = RGB(51,51,51);
- #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- VERIFY(
- m_bmpArrStatesCheckBox.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_CHECK_BOX_R1 )
- )
- );
- VERIFY(
- m_bmpArrStatesRadioButton.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_RADIO_BUTTON_R1 )
- )
- );
- m_clrMenuItemLeftAreaMarginL = RGB(225,225,225);
- m_clrMenuItemLeftAreaMarginR = RGB(255,255,255);
- VERIFY(
- m_bmpMenuItemLargeLeft.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R1_LARGE_LEFT )
- )
- );
- VERIFY(
- m_bmpMenuItemLargeRight.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R1_LARGE_RIGHT )
- )
- );
- VERIFY(
- m_bmpMenuItemSmallLeft.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R1_SMALL_LEFT )
- )
- );
- VERIFY(
- m_bmpMenuItemSmallRight.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R1_SMALL_RIGHT )
- )
- );
- VERIFY(
- m_bmpMenuArrow.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_ARROW )
- )
- );
- m_sizeMenuCheckAreaChecked.cx = 16;
- m_sizeMenuCheckAreaChecked.cy = 16;
- m_sizeMenuCheckAreaUnchecked.cx = 20;
- m_sizeMenuCheckAreaUnchecked.cy = 20;
- m_arrRectMenuCheckAreaCheckedPadding[0].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaCheckedPadding[1].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaUncheckedPadding[0].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaUncheckedPadding[1].SetRect( 1, 1, 1, 1 );
- VERIFY( m_bmpMenuCheckAreaChecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_CHECKED_R1 ) ) );
- VERIFY( m_bmpMenuCheckAreaUnchecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_UNCHECKED_R1 ) ) );
- VERIFY( m_bmpArrComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_COMBO_BOX_BUTTON_R1 ) ) );
- m_arrClrComboBoxBorder[0] = RGB(177,187,198);
- m_arrClrComboBoxBorder[1] = RGB(148,168,198);
- m_arrClrComboBoxBorder[2] = RGB(148,168,198);
- m_arrClrComboBoxBorder[3] = RGB(177,187,198);
- CRect SbSkinDataPaddingH( 5, 3, 5, 3 ), SbSkinDataPaddingV( 3, 5, 3, 5 );
- CRect rcEntirePaddingRH( 0, 2, 0, 2 ), rcEntirePaddingRV( 2, 0, 2, 0 );
- CRect rcEntirePaddingCH( 1, 1, 1, 1 ), rcEntirePaddingCV( 1, 1, 1, 1 );
- m_SbSkinDataT_Zoom.Load2007_Zoom(
- IDB_EXT_2007_ZS_PLUS_R1, IDB_EXT_2007_ZS_MINUS_R1, IDB_EXT_2007_ZS_THUMB_R1,
- RGB(222,226,236), RGB(163,175,203), RGB(213,218,231), RGB(185,194,215), AFX_IDW_DOCKBAR_TOP, false
- );
- m_SbSkinDataB_Zoom.Load2007_Zoom(
- IDB_EXT_2007_ZS_PLUS_R1, IDB_EXT_2007_ZS_MINUS_R1, IDB_EXT_2007_ZS_THUMB_R1,
- RGB(222,226,236), RGB(163,175,203), RGB(213,218,231), RGB(185,194,215), AFX_IDW_DOCKBAR_BOTTOM, false
- );
- m_SbSkinDataL_Zoom.Load2007_Zoom(
- IDB_EXT_2007_ZS_PLUS_R1, IDB_EXT_2007_ZS_MINUS_R1, IDB_EXT_2007_ZS_THUMB_R1,
- RGB(222,226,236), RGB(163,175,203), RGB(213,218,231), RGB(185,194,215), AFX_IDW_DOCKBAR_LEFT, false
- );
- m_SbSkinDataR_Zoom.Load2007_Zoom(
- IDB_EXT_2007_ZS_PLUS_R1, IDB_EXT_2007_ZS_MINUS_R1, IDB_EXT_2007_ZS_THUMB_R1,
- RGB(222,226,236), RGB(163,175,203), RGB(213,218,231), RGB(185,194,215), AFX_IDW_DOCKBAR_RIGHT, false
- );
- m_SbSkinDataH_Light.Load2007_R1(
- IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R1_HORZ,
- 17,
- IDB_EXT_2007_SCROLL_BAR_GRIPPER_R1_HORZ,
- SbSkinDataPaddingH,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- true,
- IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R1_LIGHT,
- IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R1_LIGHT,
- rcEntirePaddingRH,
- rcEntirePaddingCH
- );
- m_SbSkinDataV_Light.Load2007_R1(
- IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R1_VERT,
- 17,
- IDB_EXT_2007_SCROLL_BAR_GRIPPER_R1_VERT,
- SbSkinDataPaddingV,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- false,
- IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R1_LIGHT,
- IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R1_LIGHT,
- rcEntirePaddingRV,
- rcEntirePaddingCV
- );
- m_SbSkinDataH_Dark.Load2007_R1(
- IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R1_HORZ,
- 17,
- IDB_EXT_2007_SCROLL_BAR_GRIPPER_R1_HORZ,
- SbSkinDataPaddingH,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- true,
- IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R1_DARK,
- IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R1_DARK,
- rcEntirePaddingRH,
- rcEntirePaddingCH
- );
- m_SbSkinDataV_Dark.Load2007_R1(
- IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R1_VERT,
- 17,
- IDB_EXT_2007_SCROLL_BAR_GRIPPER_R1_VERT,
- SbSkinDataPaddingV,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- false,
- IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R1_DARK,
- IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R1_DARK,
- rcEntirePaddingRV,
- rcEntirePaddingCV
- );
- m_clrGridHeaderBkTop = RGB(253,253,253);
- m_clrGridHeaderBkBottom = RGB(212,215,220);
- m_clrGridHeaderSeparator = RGB(145,153,164);
- m_clrGridHeaderSortArrow = RGB(145,153,164);
- m_clrGridHeaderBorder = RGB(145,153,164);
- m_clrRgHeaderBkTop = RGB(253,253,253);
- m_clrRgHeaderBkBottom = RGB(212,215,220);
- m_clrRgHeaderSeparator = RGB(145,153,164);
- m_clrRgHeaderSortArrow = RGB(145,153,164);
- m_clrRgHeaderText = RGB(0,0,0);
- m_clrRgHeaderBorder = RGB(76,83,92);
- #if (!defined __EXT_MFC_NO_REPORTGRIDWND)
- m_clrRgGroupAreaBk = RGB(235,235,235);
- m_clrRgGroupAreaText = RGB(70,70,70);
- #endif // (!defined __EXT_MFC_NO_REPORTGRIDWND)
- // m_nTbbLightWeightSDDRightGlyphHeightV = 9;
- // VERIFY(
- // m_arrBmpTbbLightWeightSimpleH.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R1_SIMPLE )
- // )
- // );
- // VERIFY(
- // m_arrBmpTbbLightWeightSDDLeftH.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R1_LEFT_PART )
- // )
- // );
- // VERIFY(
- // m_arrBmpTbbLightWeightSDDRightH.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R1_RIGHT_PART )
- // )
- // );
- // VERIFY(
- // m_arrBmpTbbLightWeightSimpleV.CreateRotated9xStack(
- // m_arrBmpTbbLightWeightSimpleH,
- // 90,
- // INT(__EPBGT_GLYPH_COUNT),
- // m_arrBmpTbbLightWeightSimpleH.GetSize().cx,
- // m_nTbbLightWeightSimpleGlyphHeightH,
- // false,
- // false
- // )
- // );
- // VERIFY(
- // m_arrBmpTbbLightWeightSDDLeftV.CreateRotated9xStack(
- // m_arrBmpTbbLightWeightSDDLeftH,
- // 90,
- // INT(__EPBGT_GLYPH_COUNT),
- // m_arrBmpTbbLightWeightSDDLeftH.GetSize().cx,
- // m_nTbbLightWeightSDDLeftGlyphHeightH,
- // false,
- // false
- // )
- // );
- // VERIFY(
- // m_arrBmpTbbLightWeightSDDRightV.CreateRotated9xStack(
- // m_arrBmpTbbLightWeightSDDRightH,
- // 90,
- // INT(__EPBGT_GLYPH_COUNT),
- // m_arrBmpTbbLightWeightSDDRightH.GetSize().cx,
- // m_nTbbLightWeightSDDRightGlyphHeightH,
- // false,
- // false
- // )
- // );
- m_nPushBtnSDDRightGlyphHeightV = 9;
- VERIFY(
- m_arrBmpPushBtnSimpleH.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R1_SIMPLE )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDLeftH.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R1_LEFT_PART )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDRightH.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R1_RIGHT_PART )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSimpleV.CreateRotated9xStack(
- m_arrBmpPushBtnSimpleH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSimpleH.GetSize().cx,
- m_nPushBtnSimpleGlyphHeightH,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDLeftV.CreateRotated9xStack(
- m_arrBmpPushBtnSDDLeftH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSDDLeftH.GetSize().cx,
- m_nPushBtnSDDLeftGlyphHeightH,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDRightV.CreateRotated9xStack(
- m_arrBmpPushBtnSDDRightH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSDDRightH.GetSize().cx,
- m_nPushBtnSDDRightGlyphHeightH,
- false,
- false
- )
- );
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- m_bRibbonGroupCaptionAtTop = true;
- m_bRibbonGroupCaptionAreaHasPadding = true;
- m_nRibbonGroupCaptionAreaHeightExpanded = 16;
- m_nRibbonGroupCaptionAreaHeightCollapsed = 16;
- m_nRibbonGroupIconBkVertOffset = 0;
- m_nRibbonCaptionPartHeight = 17;
- m_rcRibbonPageOuterContentPadding.SetRect( 0, 0, 0, 0 );
- m_clrRibbonComboBackGroundNormal = RGB(231,234,241);
- m_nRibbonQuickAccessBarButtonsAlignment = 0;
- m_clrRibbonGroupCaptionTextCollapsed
- = m_clrRibbonButtonNormal
- = RGB(32,0,112);
- m_clrRibbonButtonDisabled = RGB(128,128,128);
- m_clrRibbonGroupCaptionTextExpanded = RGB( 240, 240, 240 );
- m_clrRibbonGroupCaptionTextShadowExpanded = RGB( 0, 0, 0 );
- m_sizeRibbonGroupCaptionTextOffset = CSize( 1, 1 );
- m_rcRibbonPageBkPadding.SetRect( 5, 19, 5, 10 );
- VERIFY(
- m_bmpRibbonPageBk.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_PAGE_BK_R1)
- )
- );
-
- m_rcRibbonGroupPaddingBkExpanded.SetRect( 5, 4, 5, 4 );
- VERIFY(
- m_bmpRibbonGroupBkExpanded[0].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_NORMAL_BK_R1)
- )
- );
- VERIFY(
- m_bmpRibbonGroupBkExpanded[1].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_HOVER_BK_R1)
- )
- );
-
- m_rcRibbonGroupPaddingBkCollapsed.SetRect( 6, 18, 6, 4 );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[0].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_NORMAL_BK_R1)
- )
- );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[1].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_HOVER_BK_R1)
- )
- );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[2].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_PRESSED_BK_R1)
- )
- );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[3].LoadBMP_Resource( // selected same as hover in R1
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_HOVER_BK_R1)
- )
- );
- //INT nBkIndex, nBkCount;
- // nBkCount = sizeof( m_bmpRibbonGroupBkExpanded ) / sizeof( m_bmpRibbonGroupBkExpanded[0] );
- // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // {
- // m_bmpRibbonGroupBkExpanded[nBkIndex].Make32();
- // m_bmpRibbonGroupBkExpanded[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- // } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // nBkCount = sizeof( m_bmpRibbonGroupBkCollapsed ) / sizeof( m_bmpRibbonGroupBkCollapsed[0] );
- // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // {
- // m_bmpRibbonGroupBkCollapsed[nBkIndex].Make32();
- // m_bmpRibbonGroupBkCollapsed[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- // } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- m_nRibbonSeparatorDrawModeH = INT( CExtBitmap::__EDM_TILE_H );
- m_nRibbonSeparatorDrawModeV = INT( CExtBitmap::__EDM_TILE_V );
- m_rcRibbonSeparatorPaddingH.SetRect( 8, 0, 8, 0 );
- VERIFY(
- m_bmpRibbonSeparatorH.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_H_R1)
- )
- );
- VERIFY( m_bmpRibbonSeparatorH.Make32() );
- m_bmpRibbonSeparatorH.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_rcRibbonSeparatorPaddingV.SetRect( 0, 9, 0, 9 );
- VERIFY(
- m_bmpRibbonSeparatorV.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_V_R1)
- )
- );
- VERIFY( m_bmpRibbonSeparatorV.Make32() );
- m_bmpRibbonSeparatorV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_nRibbonHeightOfQACEB = 18;
- m_nIdxRibbonQACEB_Selected = 0;
- VERIFY(
- m_bmpArrRibbonQACEB.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_QATB_CEB_R1)
- )
- );
- m_bmpArrRibbonQACEB.PreMultiplyRGBChannels();
- m_bmpArrRibbonQACEB.PreMultipliedRGBChannelsSet( true );
- m_nRibbonEmbeddedCaptionTextAlignmentFlags = (DT_SINGLELINE|DT_CENTER|DT_VCENTER);
- m_bRibbonFileButtonItegrationSupported = false;
- //INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
- //INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
- //CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
- // m_rcRibbonNcCornerLeftCP.SetRect( 22, 8, 2, 2 );
- // m_rcRibbonNcCornerRightCP.SetRect( 2, 8, 22, 2 );
- //
- // VERIFY(
- // m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R2_LUNA_BLUE)
- // )
- // );
- // m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
- // m_bmpRibbonNcCornerActiveLeft.Scale(
- // m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
- // nCaptionHeightActive,
- // _fBox
- // );
- //
- // VERIFY(
- // m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R2_LUNA_BLUE)
- // )
- // );
- // m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
- // m_bmpRibbonNcCornerInactiveLeft.Scale(
- // m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
- // nCaptionHeightInactive,
- // _fBox
- // );
- //
- // VERIFY(
- // m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R2_LUNA_BLUE)
- // )
- // );
- // m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
- // m_bmpRibbonNcCornerActiveRight.Scale(
- // m_bmpRibbonNcCornerActiveRight.GetSize().cx,
- // nCaptionHeightActive,
- // _fBox
- // );
- //
- // VERIFY(
- // m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R2_LUNA_BLUE)
- // )
- // );
- // m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
- // m_bmpRibbonNcCornerInactiveRight.Scale(
- // m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
- // nCaptionHeightInactive,
- // _fBox
- // );
- //
- // VERIFY(
- // m_bmpRibbonNcCornerHT.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_LUNA_BLUE)
- // )
- // );
- // m_bmpRibbonNcCornerHT.Make32();
- // m_bmpRibbonNcCornerHT.Scale(
- // m_bmpRibbonNcCornerHT.GetSize().cx,
- // nCaptionHeightActive,
- // _fBox
- // );
- // VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON) ) );
- // //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrRibbonFileButtonR1.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_INTERIOR_R1) ) );
- VERIFY( m_bmpRibbonFileButtonArea.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_AREA_R1) ) );
- m_bmpRibbonFileButtonArea.Make32();
- m_bmpRibbonFileButtonArea.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_rcPaddingRibbonQuickAccessBarBkAtTheBottom.SetRect( 0, 0, 0, 0 );
- VERIFY( m_bmpRibbonQuickAccessBarBkAtTheBottom.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_QATB_BK_R1) ) );
- m_nRibbonHeightOfOneDLB = 12;
- m_nDlbIdxDisabled = m_nDlbIdxNormal = 0;
- m_nDlbIdxHover = 1;
- m_nDlbIdxPressed = 2;
- rcRibbonContentPaddingDLB.SetRect( 1, 1, 1, 1 );
- VERIFY(
- m_arrBmpRibbonDLB.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_GCB_R1)
- )
- );
- m_clrRibbonGalleryInplaceBorderNormal = RGB(195,202,217);
- m_clrRibbonGalleryInplaceBorderHover = RGB(171,180,199);
- m_clrRibbonGalleryInplaceBkgndNormal = RGB(195,202,217);
- m_clrRibbonGalleryInplaceBkgndHover = RGB(192,202,222);
- m_rcRibbonGalleryScrollFill = RGB(198,204,218);
- m_rcRibbonGalleryScrollButtonPadding.SetRect( 3, 3, 3, 3 );
- m_nHeightRibbonGalleryScrollButton = -1; //20;
- m_nIndexRibbonGalleryScrollButtonDisabled = 0;
- m_nIndexRibbonGalleryScrollButtonNormal = 1;
- m_nIndexRibbonGalleryScrollButtonHover = 2;
- m_nIndexRibbonGalleryScrollButtonPressed = 3;
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonDown.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_DOWN_R1)
- )
- );
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonUp.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_UP_R1)
- )
- );
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonMenu.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_MENU_R1)
- )
- );
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- VERIFY( m_bmpRibbonDDA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_DDA_R1) ) );
- VERIFY( m_bmpRibbonDDA.Make32() );
- m_bmpRibbonDDA.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY( m_bmpArrRibbonComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_COMBO_BOX_BUTTON_R1) ) );
- // tool buttons 2007
- m_nHeightOfButtonLSM = 66;
- // tool buttons 2007
- m_arrIndicesButtonTS[INT(__E07BI_NORMAL)] = 0;
- m_arrIndicesButtonTS[INT(__E07BI_HOVER)] = 3;
- m_arrIndicesButtonTS[INT(__E07BI_PRESSED)] = 2;
- m_arrIndicesButtonTS[INT(__E07BI_HDD)] = 0;
- m_arrIndicesButtonTS[INT(__E07BI_SEL_T)] = 1;
- m_arrIndicesButtonTS[INT(__E07BI_INDETERMINATE)] = 0;
- m_arrIndicesButtonSS_Left[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonSS_Left[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonSS_Left[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonSS_Left[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonSS_Left[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonSS_Left[INT(__E07BI_INDETERMINATE)] = 4;
- m_arrIndicesButtonSS_Right[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonSS_Right[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonSS_Right[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonSS_Right[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonSS_Right[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonSS_Right[INT(__E07BI_INDETERMINATE)] = -1;
- m_arrIndicesButtonLSM[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonLSM[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonLSM[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonLSM[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonLSM[INT(__E07BI_SEL_T)] = 0;
- m_arrIndicesButtonLSM[INT(__E07BIX_INDETERMINATE)] = 0;
- // m_arrIndicesButtonLSB[INT(__E07BI_NORMAL)] = -1;
- // m_arrIndicesButtonLSB[INT(__E07BI_HOVER)] = 0;
- // m_arrIndicesButtonLSB[INT(__E07BI_PRESSED)] = 1;
- // m_arrIndicesButtonLSB[INT(__E07BI_HDD)] = 4;
- // m_arrIndicesButtonLSB[INT(__E07BI_SEL_T)] = 0;
- // m_arrIndicesButtonLSB[INT(__E07BI_INDETERMINATE)] = 0;
- m_arrIndicesButtonLSXM[INT(__E07BIX_NORMAL)] = -1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER)] = 0;
- m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER2)] = 6;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED)] = 1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED2)] = 2;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED3)] = 3;
- m_arrIndicesButtonLSXM[INT(__E07BIX_INDETERMINATE)] = 5;
- m_arrIndicesButtonLSXM[INT(__E07BIX_SELECTED)] = 6;
- m_arrIndicesButtonLSXB[INT(__E07BIX_NORMAL)] = -1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER)] = 0;
- m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER2)] = 5;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED)] = 1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED2)] = 2;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED3)] = 2;
- m_arrIndicesButtonLSXB[INT(__E07BIX_INDETERMINATE)] = 4;
- m_arrIndicesButtonLSXB[INT(__E07BIX_SELECTED)] = 5;
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_SOLID)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SOLID_R1)
- )
- );
- //m_bmpArrButtonTS[INT(__EBTSA_SOLID)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_LEFT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_LEFT_R1)
- )
- );
- //m_bmpArrButtonTS[INT(__EBTSA_LEFT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_MIDDLE_R1)
- )
- );
- //m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_RIGHT_R1)
- )
- );
- //m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_LEFT_R1)
- )
- );
- //m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_RIGHT_R1)
- )
- );
- //m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
- m_bmpArrButtonSS_simple = m_bmpArrButtonSS_DD[ INT(__EBSSA_LEFT) ];
- if( ! m_bmpArrButtonSS_simple.IsEmpty() )
- {
- CSize _sizeBmp = m_bmpArrButtonSS_simple.GetSize();
- INT nY = 0, nXRange = _sizeBmp.cx / 2;
- for( ; nY < _sizeBmp.cy; nY ++ )
- {
- INT nXSrc = nXRange - 1, nXDst = _sizeBmp.cx - nXRange;
- for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
- {
- RGBQUAD _pixel;
- VERIFY( m_bmpArrButtonSS_simple.GetPixel( nXSrc, nY, _pixel ) );
- VERIFY( m_bmpArrButtonSS_simple.SetPixel( nXDst, nY, _pixel ) );
- } // for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
- } // for( ; nY < _sizeBmp.cy; nY ++ )
- } // if( m_bmpArrButtonSS_simple.IsEmpty() )
- VERIFY(
- m_bmpArrButtonLSM.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_ALL_R1) // IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R1
- )
- );
- // m_bmpArrButtonLSM.PreMultipliedRGBChannelsSet( true );
- // VERIFY(
- // m_bmpArrButtonLSB.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R1)
- // )
- // );
- // m_bmpArrButtonLSB.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonLSXM.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R1)
- )
- );
- // m_bmpArrButtonLSXM.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonLSXB.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R1)
- )
- );
- // m_bmpArrButtonLSXB.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_HOVER_R1)
- )
- );
- m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].Make32();
- m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY(
- m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_PRESSED_R1)
- )
- );
- m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].Make32();
- m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY(
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_HOVER_R1)
- )
- );
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].Make32();
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY(
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_PRESSED_R1)
- )
- );
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].Make32();
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_clrRibbonModeMenuTextNormal = RGB(0,0,128);
- VERIFY(
- m_bmpRibbonModeMenuBorder.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_MENU_BORDER_R1)
- )
- );
- m_bmpRibbonModeMenuBorder.Make32();
- m_bmpRibbonModeMenuBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_clrMenuCaptionText = RGB(0,0,128);;
- m_rcMenuCaptionBmpPadding.SetRect( 0, 2, 0, 2 );
- VERIFY(
- m_bmpMenuCaptionBk.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_MENU_CAPTION_BK_R1)
- )
- );
- m_rcPaddingRibbonFileMenuBigBorder.SetRect( 8, 8, 8, 26 );
- VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R1) ) );
- m_bmpRibbonFileMenuBigBorder.Make32();
- m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
-
- m_rcPaddingRibbonFileMenuOptionsButton.SetRect( 2, 2, 2, 2 );
- // VERIFY(
- // m_bmpRibbonFileMenuOptionsButtonCold.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_COLD_R1)
- // )
- // );
- // m_bmpRibbonFileMenuOptionsButtonCold.Make32();
- // m_bmpRibbonFileMenuOptionsButtonCold.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY(
- m_bmpRibbonFileMenuOptionsButtonHot.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_HOT_R1)
- )
- );
- m_bmpRibbonFileMenuOptionsButtonHot.Make32();
- m_bmpRibbonFileMenuOptionsButtonHot.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY( m_bmpResizingGripper.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RESIZING_GRIPPER_R1) ) );
- m_bmpResizingGripper.Make32();
- m_bmpResizingGripper.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- // spin bitmaps
- VERIFY( m_arrBmpSpinArrowDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_DOWN_R1) ) );
- VERIFY( m_arrBmpSpinArrowUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_UP_R1) ) );
- VERIFY( m_arrBmpSpinDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_DOWN_R1) ) );
- VERIFY( m_arrBmpSpinUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_UP_R1) ) );
- }
- CExtPaintManagerOffice2007_R1::~CExtPaintManagerOffice2007_R1()
- {
- }
- CExtPaintManagerOffice2010_Impl::CExtPaintManagerOffice2010_Impl()
- {
- #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- m_bPnPaneCaptFontBold = false;
- m_strPnPaneCaptCustomFontFaceName = _T("");
- #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- }
- CExtPaintManagerOffice2010_Impl::~CExtPaintManagerOffice2010_Impl()
- {
- }
- CExtPaintManagerOffice2010_R1::CExtPaintManagerOffice2010_R1()
- {
- m_bThemedMenuItemsEverywhere = true;
-
- m_clrFillHint = RGB(205,205,205);
- m_clrAccentHint = RGB(255,227,140); // RGB(156,193,234);
- m_clrIconAlphaColor = RGB(114,121,138);
- m_clrAdvTipGradientBottom = RGB(229,229,240);
- VERIFY( m_arrMdiRightIcons[0].m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_MDI_ICON_SC_MINIMIZE) ) );
- VERIFY( m_arrMdiRightIcons[1].m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_MDI_ICON_SC_RESTORE) ) );
- VERIFY( m_arrMdiRightIcons[2].m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_MDI_ICON_SC_CLOSE) ) );
- // m_clrDCA1 = RGB(172,180,198);
- // m_clrDCA2 = RGB(113,125,152);
- // m_clrDCA3 = RGB(132,141,166);
- // m_bDocumentClientAreaBkgndR2 = false;
- // VERIFY( m_bmpDCA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_DCA_R1) ) );
- // m_bmpDCA.PreMultiplyRGBChannels();
- // m_bmpDCA.PreMultipliedRGBChannelsSet( true );
- m_clrDCA_Solid = RGB(220,226,232);
- m_bUseNcFrameBmpForDockerBkgnd = true;
- m_clrCustomDropDownGlyphEnabled = RGB(0,0,0);
- m_clrCustomDropDownGlyphDisabled = RGB(141,141,141);
- m_clrDockingFrameDark = m_clrFloatingToolbarGripperSolid = RGB(83,96,125);
- m_clrDockingFrameCaptionTextActive = RGB(51,51,51);
- m_clrDockingFrameCaptionTextInactive = RGB(51,51,51);
- m_clrDockingFrameCaptionTextFloatingFixed = RGB(255,255,255);
- m_clrDockingCaptionShapeFixedNormal = RGB(255,255,255);
- m_rcNcFrameBordersActive.SetRect( 3, 4, 3, 2 );
- m_rcNcFrameBordersInactive.SetRect( 3, 4, 3, 2 );
- m_nCaptionHeightActive = m_nCaptionHeightInactive = 26;
- VERIFY( m_bmpNcFrameActive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_FRAME_ACTIVE_R1) ) );
- VERIFY( m_bmpNcFrameInactive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_FRAME_INACTIVE_R1) ) );
- VERIFY( m_bmpNcFrameActive.Make32() );
- VERIFY( m_bmpNcFrameInactive.Make32() );
- m_bmpNcFrameActive.AlphaColor( m_clrTransparentNcFrameActive, RGB(0,0,0), 0 );
- m_bmpNcFrameInactive.AlphaColor( m_clrTransparentNcFrameInactive, RGB(0,0,0), 0 );
- m_clrNcFrameTextActive = RGB(69,69,69); // = RGB(123,123,123);
- m_clrNcFrameTextInactive = RGB(163,163,163); // = RGB(183,183,183);
- m_bmpNcFrameActive.PreMultiplyRGBChannels();
- m_bmpNcFrameActive.PreMultipliedRGBChannelsSet( true );
- m_bmpNcFrameInactive.PreMultiplyRGBChannels();
- m_bmpNcFrameInactive.PreMultipliedRGBChannelsSet( true );
- m_sizeNcButtonShapeInArr.cx = m_sizeNcButtonShapeInArr.cy = 21;
- m_nNcBtnIdxNormalActive = m_nNcBtnIdxNormalInactive = 0;
- m_rcNcButtonBkPadding.SetRect( 4, 4, 4, 4 );
- VERIFY( m_bmpNcButtonBkHover.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_BUTTON_BK_HOVER_R1) ) );
- VERIFY( m_bmpNcButtonBkPressed.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_BUTTON_BK_PRESSED_R1) ) );
- VERIFY( m_bmpNcButtonBkHover.Make32() );
- VERIFY( m_bmpNcButtonBkPressed.Make32() );
- m_bmpNcButtonBkHover.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkPressed.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkHover.PreMultiplyRGBChannels();
- m_bmpNcButtonBkHover.PreMultipliedRGBChannelsSet( true );
- m_bmpNcButtonBkPressed.PreMultiplyRGBChannels();
- m_bmpNcButtonBkPressed.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpNcButtonBkHoverX.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_BUTTON_BK_HOVER_R1_X) ) );
- VERIFY( m_bmpNcButtonBkPressedX.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_BUTTON_BK_PRESSED_R1_X) ) );
- VERIFY( m_bmpNcButtonBkHoverX.Make32() );
- VERIFY( m_bmpNcButtonBkPressedX.Make32() );
- m_bmpNcButtonBkHoverX.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkPressedX.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_bmpNcButtonBkHoverX.PreMultiplyRGBChannels();
- m_bmpNcButtonBkHoverX.PreMultipliedRGBChannelsSet( true );
- m_bmpNcButtonBkPressedX.PreMultiplyRGBChannels();
- m_bmpNcButtonBkPressedX.PreMultipliedRGBChannelsSet( true );
- m_sizeNcButtonShapeInArr.cx = 13;
- m_sizeNcButtonShapeInArr.cy = 12;
- m_nNcBtnIdxNormalActive = 0;
- m_nNcBtnIdxHover = 1;
- m_nNcBtnIdxPressed = 2;
- m_nNcBtnIdxNormalInactive = 3;
- m_nNcBtnIdxDisabled = 4;
- VERIFY( m_bmpArrNcButtonsClose.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_ARR_CLOSE_R1) ) );
- // m_bmpArrNcButtonsClose.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsClose.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsMaximize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_ARR_MAXIMIZE_R1) ) );
- // m_bmpArrNcButtonsMaximize.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsMaximize.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsRestore.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_ARR_RESTORE_R1) ) );
- // m_bmpArrNcButtonsRestore.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsRestore.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsMinimize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_ARR_MINIMIZE_R1) ) );
- // m_bmpArrNcButtonsMinimize.PreMultiplyRGBChannels();
- m_bmpArrNcButtonsMinimize.PreMultipliedRGBChannelsSet( true );
- VERIFY( m_bmpArrNcButtonsHelp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_NC_ARR_HELP_R1) ) );
- m_bmpArrNcButtonsHelp.PreMultiplyRGBChannels();
- #if (!defined __EXT_MFC_NO_STATUSBAR)
- m_rcStatusBkPadding.SetRect( 2, 2, 2, 2 );
- VERIFY( m_bmpStatusBkLight.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_STATUSBAR_BK_LIGHT_R1) ) );
- VERIFY( m_bmpStatusBkDark.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_STATUSBAR_BK_DARK_R1) ) );
- m_rcStatusSeparatorPadding.SetRect( 0, 2, 0, 2 );
- VERIFY( m_bmpStatusSeparator.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_STATUSBAR_SEPARATOR_R1) ) );
- #endif // (!defined __EXT_MFC_NO_STATUSBAR)
- #if (!defined __EXT_MFC_NO_TAB_CTRL)
- m_clrTabTextNormal = m_clrTabTextSelected = RGB( 52, 52, 64 );
- m_clrTabTextNormalDWM = m_clrTabTextSelectedDWM = RGB( 76, 83, 92 );
- m_nIdxTabShapeHover = 1;
- m_nIdxTabShapePressed = 0;
- m_nIdxTabShapeSelected = 0;
- m_nIdxTabShapeSelectedHover = 0;
- m_arrSizeTabShape[__ETSOI_TOP].cx
- = m_arrSizeTabShape[__ETSOI_BOTTOM].cx
- = m_arrSizeTabShape[__ETSOI_LEFT].cy
- = m_arrSizeTabShape[__ETSOI_RIGHT].cy
- = 19;
- m_arrSizeTabShape[__ETSOI_TOP].cy
- = m_arrSizeTabShape[__ETSOI_BOTTOM].cy
- = m_arrSizeTabShape[__ETSOI_LEFT].cx
- = m_arrSizeTabShape[__ETSOI_RIGHT].cx
- = 23;
- m_arrRectTabShapePadding[__ETSOI_TOP].SetRect( 4, 3, 4, 3 );
- m_arrRectTabShapePadding[__ETSOI_BOTTOM].SetRect( 4, 3, 4, 3 );
- m_arrRectTabShapePadding[__ETSOI_LEFT].SetRect( 3, 4, 3, 4 );
- m_arrRectTabShapePadding[__ETSOI_RIGHT].SetRect( 3, 4, 3, 4 );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_TOP].LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_TAB_SHAPE_ARR_R1 )
- )
- );
- VERIFY( m_arrBmpTabShapeNormal[__ETSOI_TOP].Make32() );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_BOTTOM].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 180,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_LEFT].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 270,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabShapeNormal[__ETSOI_RIGHT].CreateRotated9xStack(
- m_arrBmpTabShapeNormal[__ETSOI_TOP],
- 90,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabShapeSelArea[__ETSOI_TOP].LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_TAB_SHAPE_ARR_SEL_AREA_R1 )
- )
- );
- //VERIFY( m_arrBmpTabShapeSelArea[__ETSOI_TOP].Make32() );
- //m_arrBmpTabShapeSelArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_arrBmpTabShapeSelArea[__ETSOI_BOTTOM].CreateRotated9xStack(
- m_arrBmpTabShapeSelArea[__ETSOI_TOP],
- 180,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- //m_arrBmpTabShapeSelArea[__ETSOI_BOTTOM].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_arrBmpTabShapeSelArea[__ETSOI_LEFT].CreateRotated9xStack(
- m_arrBmpTabShapeSelArea[__ETSOI_TOP],
- 270,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- //m_arrBmpTabShapeSelArea[__ETSOI_LEFT].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_arrBmpTabShapeSelArea[__ETSOI_RIGHT].CreateRotated9xStack(
- m_arrBmpTabShapeSelArea[__ETSOI_TOP],
- 90,
- 4,
- m_arrSizeTabShape[__ETSOI_TOP].cx,
- m_arrSizeTabShape[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- //m_arrBmpTabShapeSelArea[__ETSOI_RIGHT].PreMultipliedRGBChannelsSet( true );
- m_arrRectTabAreaPadding[__ETSOI_TOP].SetRect( 3, 3, 3, 3 );
- m_arrRectTabAreaPadding[__ETSOI_BOTTOM].SetRect( 3, 3, 3, 3 );
- m_arrRectTabAreaPadding[__ETSOI_LEFT].SetRect( 3, 3, 3, 3 );
- m_arrRectTabAreaPadding[__ETSOI_RIGHT].SetRect( 3, 3, 3, 3 );
- m_arrTabAreaMargins[__ETSOI_TOP] = 1;
- m_arrTabAreaMargins[__ETSOI_BOTTOM] = 1;
- m_arrTabAreaMargins[__ETSOI_LEFT] = 1;
- m_arrTabAreaMargins[__ETSOI_RIGHT] = 1;
- m_arrSizeTabSeparator[__ETSOI_TOP].cx
- = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cx
- = m_arrSizeTabSeparator[__ETSOI_LEFT].cy
- = m_arrSizeTabSeparator[__ETSOI_RIGHT].cy
- = 2;
- m_arrSizeTabSeparator[__ETSOI_TOP].cy
- = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cy
- = m_arrSizeTabSeparator[__ETSOI_LEFT].cx
- = m_arrSizeTabSeparator[__ETSOI_RIGHT].cx
- = 23;
- m_arrRectTabSeparatorPadding[__ETSOI_TOP].SetRect( 0, 2, 0, 2 );
- m_arrRectTabSeparatorPadding[__ETSOI_BOTTOM].SetRect( 0, 2, 0, 2 );
- m_arrRectTabSeparatorPadding[__ETSOI_LEFT].SetRect( 2, 0, 2, 0 );
- m_arrRectTabSeparatorPadding[__ETSOI_RIGHT].SetRect( 2, 0, 2, 0 );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_TOP].LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_TAB_SEPARATOR_R1 )
- )
- );
- VERIFY( m_arrBmpTabSeparator[__ETSOI_TOP].Make32() );
- m_arrBmpTabSeparator[__ETSOI_TOP].PreMultiplyRGBChannels();
- m_arrBmpTabSeparator[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_BOTTOM].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 180,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_LEFT].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 270,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpTabSeparator[__ETSOI_RIGHT].CreateRotated9xStack(
- m_arrBmpTabSeparator[__ETSOI_TOP],
- 90,
- 1,
- m_arrSizeTabSeparator[__ETSOI_TOP].cx,
- m_arrSizeTabSeparator[__ETSOI_TOP].cy,
- false,
- false
- )
- );
- #endif // (!defined __EXT_MFC_NO_TAB_CTRL)
- VERIFY(
- m_bmpArrStatesCheckBox.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_CHECK_BOX_R1 )
- )
- );
- VERIFY(
- m_bmpArrStatesRadioButton.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_RADIO_BUTTON_R1 )
- )
- );
- m_clrMenuItemLeftAreaMarginL = RGB(226, 228, 231);
- m_clrMenuItemLeftAreaMarginR = RGB(245, 245, 245);
- m_rcMenuItemPaddingLargeLeft.SetRect( 3, 3, 3, 16 );
- m_rcMenuItemPaddingLargeRight.SetRect( 1, 3, 3, 16 );
- m_rcMenuItemPaddingSmallLeft.SetRect( 3, 3, 3, 10 );
- m_rcMenuItemPaddingSmallRight.SetRect( 1, 3, 3, 10 );
- VERIFY(
- m_bmpMenuItemLargeLeft.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_ITEM_R1_LARGE_LEFT )
- )
- );
- VERIFY(
- m_bmpMenuItemLargeRight.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_ITEM_R1_LARGE_RIGHT )
- )
- );
- VERIFY(
- m_bmpMenuItemSmallLeft.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_ITEM_R1_SMALL_LEFT )
- )
- );
- VERIFY(
- m_bmpMenuItemSmallRight.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_ITEM_R1_SMALL_RIGHT )
- )
- );
- VERIFY(
- m_bmpMenuArrow.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_ITEM_ARROW )
- )
- );
- m_sizeMenuCheckAreaChecked.cx = 16;
- m_sizeMenuCheckAreaChecked.cy = 16;
- m_sizeMenuCheckAreaUnchecked.cx = 20;
- m_sizeMenuCheckAreaUnchecked.cy = 20;
- m_arrRectMenuCheckAreaCheckedPadding[0].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaCheckedPadding[1].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaUncheckedPadding[0].SetRect( 1, 1, 1, 1 );
- m_arrRectMenuCheckAreaUncheckedPadding[1].SetRect( 1, 1, 1, 1 );
- VERIFY( m_bmpMenuCheckAreaChecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_CHECK_AREA_CHECKED_R1 ) ) );
- VERIFY( m_bmpMenuCheckAreaUnchecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_MENU_CHECK_AREA_UNCHECKED_R1 ) ) );
- #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- m_arrClrPnCaptNormal[0] = RGB(235,238,250);
- m_arrClrPnCaptNormal[1] = RGB(215,219,229);
- m_arrClrPnCaptNormal[2] = RGB(197,199,209);
- m_arrClrPnCaptNormal[3] = RGB(212,216,226);
- m_arrClrPnSplitter[0] = RGB( 240, 243, 247 );
- m_arrClrPnSplitter[1] = RGB( 215, 219, 225 );
- m_clrPnCaptText = RGB( 30, 57, 91 );
- m_arrClrPnItemText[0] = RGB(0,0,0);
- m_arrClrPnItemText[1] = RGB(76,83,92);
- m_clrPnConfigButton = RGB(101,104,112);
- static const UINT g_arrResIdPnItemExpanded[ePn_Count] =
- {
- IDB_EXT_2010_OFFICE_PN_ITEM_EXPANDED_NORMAL_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_EXPANDED_HOVER_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_EXPANDED_PRESSED_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_EXPANDED_SELECTED_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_EXPANDED_SELECTED_HOVER_R1,
- };
- static const UINT g_arrResIdPnItemCollapsed[ePn_Count] =
- {
- IDB_EXT_2010_OFFICE_PN_ITEM_COLLAPSED_NORMAL_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_COLLAPSED_HOVER_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_COLLAPSED_PRESSED_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_COLLAPSED_SELECTED_R1,
- IDB_EXT_2010_OFFICE_PN_ITEM_COLLAPSED_SELECTED_HOVER_R1,
- };
- INT nPnIndex;
- for( nPnIndex = 0; nPnIndex < INT(ePn_Count); nPnIndex ++ )
- {
- VERIFY( m_arrBmpPnItemExpanded[nPnIndex].LoadBMP_Resource( MAKEINTRESOURCE(g_arrResIdPnItemExpanded[nPnIndex]) ) );
- VERIFY( m_arrBmpPnItemCollapsed[nPnIndex].LoadBMP_Resource( MAKEINTRESOURCE(g_arrResIdPnItemCollapsed[nPnIndex]) ) );
- m_arrRcPnItemPaddingExpanded[nPnIndex].SetRect( 0, 2, 0, 2 );
- m_arrRcPnItemPaddingCollapsed[nPnIndex].SetRect( 0, 0, 0, 0 );
- m_arrClrPnItemTextBmpVer[nPnIndex] = RGB(0,0,0);
- }
- #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
- VERIFY( m_bmpArrComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_COMBO_BOX_BUTTON_R1 ) ) );
- m_bmpArrComboBoxDropDown.PreMultipliedRGBChannelsSet( true );
- m_arrClrComboBoxBorder[0] = RGB(212,214,217);
- m_arrClrComboBoxBorder[1] = RGB(180,180,180);
- m_arrClrComboBoxBorder[2] = RGB(212,214,217);
- m_arrClrComboBoxBorder[3] = RGB(228,231,235);
- CRect SbSkinDataPaddingH( 5, 3, 5, 3 ), SbSkinDataPaddingV( 3, 5, 3, 5 );
- CRect rcEntirePaddingRH( 2, 2, 2, 2 ), rcEntirePaddingRV( 2, 2, 2, 2 );
- CRect rcEntirePaddingCH( 1, 1, 1, 1 ), rcEntirePaddingCV( 1, 1, 1, 1 );
- m_SbSkinDataT_Zoom.Load2010_Zoom_R1(
- IDB_EXT_2010_OFFICE_ZS_PLUS_R1, IDB_EXT_2010_OFFICE_ZS_MINUS_R1, IDB_EXT_2010_OFFICE_ZS_THUMB_R1,
- RGB(204,204,204), RGB(37,37,37), RGB(204,204,204), RGB(37,37,37), AFX_IDW_DOCKBAR_TOP
- );
- m_SbSkinDataB_Zoom.Load2010_Zoom_R1(
- IDB_EXT_2010_OFFICE_ZS_PLUS_R1, IDB_EXT_2010_OFFICE_ZS_MINUS_R1, IDB_EXT_2010_OFFICE_ZS_THUMB_R1,
- RGB(204,204,204), RGB(37,37,37), RGB(204,204,204), RGB(37,37,37), AFX_IDW_DOCKBAR_BOTTOM
- );
- m_SbSkinDataL_Zoom.Load2010_Zoom_R1(
- IDB_EXT_2010_OFFICE_ZS_PLUS_R1, IDB_EXT_2010_OFFICE_ZS_MINUS_R1, IDB_EXT_2010_OFFICE_ZS_THUMB_R1,
- RGB(204,204,204), RGB(37,37,37), RGB(204,204,204), RGB(37,37,37), AFX_IDW_DOCKBAR_LEFT
- );
- m_SbSkinDataR_Zoom.Load2010_Zoom_R1(
- IDB_EXT_2010_OFFICE_ZS_PLUS_R1, IDB_EXT_2010_OFFICE_ZS_MINUS_R1, IDB_EXT_2010_OFFICE_ZS_THUMB_R1,
- RGB(204,204,204), RGB(37,37,37), RGB(204,204,204), RGB(37,37,37), AFX_IDW_DOCKBAR_RIGHT
- );
- m_SbSkinDataH_Light.Load2007_R1(
- IDB_EXT_2010_OFFICE_SCROLL_BAR_STACK_BUTTONS_R1_HORZ_LIGHT,
- 15,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_GRIPPER_R1_HORZ,
- SbSkinDataPaddingH,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- true,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ENTIRE_BK_R1_LIGHT,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_PAGE_BK_R1_LIGHT,
- rcEntirePaddingRH,
- rcEntirePaddingCH
- );
- m_SbSkinDataV_Light.Load2007_R1(
- IDB_EXT_2010_OFFICE_SCROLL_BAR_STACK_BUTTONS_R1_VERT_LIGHT,
- 17,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_GRIPPER_R1_VERT,
- SbSkinDataPaddingV,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- false,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ENTIRE_BK_R1_LIGHT,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_PAGE_BK_R1_LIGHT,
- rcEntirePaddingRV,
- rcEntirePaddingCV
- );
- m_SbSkinDataH_Dark.Load2007_R1(
- IDB_EXT_2010_OFFICE_SCROLL_BAR_STACK_BUTTONS_R1_HORZ_DARK,
- 15,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_GRIPPER_R1_HORZ,
- SbSkinDataPaddingH,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- true,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ENTIRE_BK_R1_DARK,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_PAGE_BK_R1_DARK,
- rcEntirePaddingRH,
- rcEntirePaddingCH
- );
- m_SbSkinDataV_Dark.Load2007_R1(
- IDB_EXT_2010_OFFICE_SCROLL_BAR_STACK_BUTTONS_R1_VERT_DARK,
- 17,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_GRIPPER_R1_VERT,
- SbSkinDataPaddingV,
- COLORREF(-1L),
- COLORREF(-1L),
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_UP_DISABLED_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_NORMAL_R1,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ARROW_DOWN_DISABLED_R1,
- false,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_ENTIRE_BK_R1_DARK,
- IDB_EXT_2010_OFFICE_SCROLL_BAR_PAGE_BK_R1_DARK,
- rcEntirePaddingRV,
- rcEntirePaddingCV
- );
- m_clrGridHeaderBkTop = RGB(253,253,253);
- m_clrGridHeaderBkBottom = RGB(212,215,220);
- m_clrGridHeaderSeparator = RGB(145,153,164);
- m_clrGridHeaderSortArrow = RGB(145,153,164);
- m_clrGridHeaderBorder = RGB(145,153,164);
- m_clrRgHeaderBkTop = RGB(253,253,253);
- m_clrRgHeaderBkBottom = RGB(212,215,220);
- m_clrRgHeaderSeparator = RGB(145,153,164);
- m_clrRgHeaderSortArrow = RGB(145,153,164);
- m_clrRgHeaderText = RGB(0,0,0);
- m_clrRgHeaderBorder = RGB(76,83,92);
- #if (!defined __EXT_MFC_NO_REPORTGRIDWND)
- m_clrRgGroupAreaBk = RGB(235,235,235);
- m_clrRgGroupAreaText = RGB(70,70,70);
- #endif // (!defined __EXT_MFC_NO_REPORTGRIDWND)
- m_nPushBtnSimpleGlyphHeightH = 43;
- m_nPushBtnSimpleGlyphHeightV = 43;
- m_nPushBtnSDDLeftGlyphHeightH = 43;
- m_nPushBtnSDDLeftGlyphHeightV = 43;
- m_nPushBtnSDDRightGlyphHeightH = 43;
- m_nPushBtnSDDRightGlyphHeightV = 9;
- m_rcPushBtnSimplePaddingH.SetRect( 3, 3, 3, 3 );
- m_rcPushBtnSimplePaddingV.SetRect( 3, 3, 3, 3 );
- m_rcPushBtnSDDLeftPaddingH.SetRect( 3, 3, 3, 3 );
- m_rcPushBtnSDDLeftPaddingV.SetRect( 3, 3, 3, 3 );
- m_rcPushBtnSDDRightPaddingH.SetRect( 3, 3, 3, 3 );
- m_rcPushBtnSDDRightPaddingV.SetRect( 3, 3, 3, 3 );
- VERIFY(
- m_arrBmpPushBtnSimpleH.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_BUTTON_R1_SIMPLE )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDLeftH.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_BUTTON_R1_LEFT_PART )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDRightH.LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_EXT_2010_OFFICE_BUTTON_R1_RIGHT_PART )
- )
- );
- VERIFY(
- m_arrBmpPushBtnSimpleV.CreateRotated9xStack(
- m_arrBmpPushBtnSimpleH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSimpleH.GetSize().cx,
- m_nPushBtnSimpleGlyphHeightH,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDLeftV.CreateRotated9xStack(
- m_arrBmpPushBtnSDDLeftH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSDDLeftH.GetSize().cx,
- m_nPushBtnSDDLeftGlyphHeightH,
- false,
- false
- )
- );
- VERIFY(
- m_arrBmpPushBtnSDDRightV.CreateRotated9xStack(
- m_arrBmpPushBtnSDDRightH,
- 90,
- INT(__EPBGT_GLYPH_COUNT),
- m_arrBmpPushBtnSDDRightH.GetSize().cx,
- m_nPushBtnSDDRightGlyphHeightH,
- false,
- false
- )
- );
- m_arrBmpPushBtnSimpleV.PreMultipliedRGBChannelsSet( true );
- m_arrBmpPushBtnSDDLeftV.PreMultipliedRGBChannelsSet( true );
- m_arrBmpPushBtnSDDRightV.PreMultipliedRGBChannelsSet( true );
- #if (!defined __EXT_MFC_NO_RIBBON_BAR)
- if( g_PaintManager.m_bIsWinVistaOrLater )
- {
- VERIFY( m_bmpRibbonTabAreaBlur.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TAB_AREA_DWM_BLUR) ) );
- m_rcRibbonTabAreaBlurPadding.SetRect( 35, 0, 35, 36 );
- }
- m_clrRibbonTabClientAreaActive = RGB(227,230,232);
- m_clrRibbonTabClientAreaInactive = RGB(252,252,252);
- m_clrContractedMargin1 = RGB(128,128,128);
- m_clrContractedMargin2 = RGB(128,128,128);
- m_bRibbonGroupCaptionAtTop = false;
- m_bRibbonGroupCaptionAreaHasPadding = true;
- m_nRibbonGroupCaptionAreaHeightExpanded = 16;
- m_nRibbonGroupCaptionAreaHeightCollapsed = 16;
- m_nRibbonGroupIconBkVertOffset = 2;
- m_nRibbonCaptionPartHeight = 17;
- m_rcRibbonPageOuterContentPadding.SetRect( 0, 0, 0, 0 );
- m_clrRibbonComboBackGroundNormal = RGB(255,255,255);
- m_clrRibbonComboBackGroundDisabled = RGB(255,255,255);
- m_nRibbonTabIntersectionHeight = 1;
- //m_nRibbonQuickAccessBarButtonsAlignment = 0;
- m_clrRibbonGroupCaptionTextCollapsed
- = m_clrRibbonButtonNormal
- = RGB(57,60,63);
- m_clrRibbonButtonDisabled = RGB(128,128,128);
- m_clrRibbonGroupCaptionTextExpanded = RGB( 52, 52, 64 );
- //m_clrRibbonGroupCaptionTextShadowExpanded = RGB( 0, 0, 0 );
- //m_sizeRibbonGroupCaptionTextOffset = CSize( 1, 1 );
- m_nRibbonGroupCaptionTextDF
- = m_nRibbonGroupCaptionTextShadowDF
- = DT_SINGLELINE|DT_CENTER|DT_VCENTER|DT_END_ELLIPSIS;
- m_rcRibbonPageBkPadding.SetRect( 1, 1, 1, 1 );
- VERIFY(
- m_bmpRibbonPageBk.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_PAGE_BK_R1)
- )
- );
-
- m_rcRibbonGroupPaddingBkExpanded.SetRect( 2, 6, 2, 2 );
- VERIFY(
- m_bmpRibbonGroupBkExpanded[0].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_EXPANDED_NORMAL_BK_R1)
- )
- );
- m_bmpRibbonGroupBkExpanded[0].PreMultipliedRGBChannelsSet( false );
- VERIFY(
- m_bmpRibbonGroupBkExpanded[1].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_EXPANDED_HOVER_BK_R1)
- )
- );
- m_bmpRibbonGroupBkExpanded[1].PreMultipliedRGBChannelsSet( false );
- m_rcRibbonGroupPaddingBkCollapsed.SetRect( 2, 6, 2, 2 );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[0].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_COLLAPSED_NORMAL_BK_R1)
- )
- );
- m_bmpRibbonGroupBkCollapsed[0].PreMultipliedRGBChannelsSet( false );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[1].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_COLLAPSED_HOVER_BK_R1)
- )
- );
- m_bmpRibbonGroupBkCollapsed[1].PreMultipliedRGBChannelsSet( false );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[2].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_COLLAPSED_PRESSED_BK_R1)
- )
- );
- m_bmpRibbonGroupBkCollapsed[2].PreMultipliedRGBChannelsSet( false );
- VERIFY(
- m_bmpRibbonGroupBkCollapsed[3].LoadBMP_Resource( // selected same as hover in R1
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_COLLAPSED_HOVER_BK_R1)
- )
- );
- m_bmpRibbonGroupBkCollapsed[3].PreMultipliedRGBChannelsSet( false );
- //INT nBkIndex, nBkCount;
- // nBkCount = sizeof( m_bmpRibbonGroupBkExpanded ) / sizeof( m_bmpRibbonGroupBkExpanded[0] );
- // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // {
- // m_bmpRibbonGroupBkExpanded[nBkIndex].Make32();
- // m_bmpRibbonGroupBkExpanded[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- // } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // nBkCount = sizeof( m_bmpRibbonGroupBkCollapsed ) / sizeof( m_bmpRibbonGroupBkCollapsed[0] );
- // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- // {
- // m_bmpRibbonGroupBkCollapsed[nBkIndex].Make32();
- // m_bmpRibbonGroupBkCollapsed[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- // } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
- VERIFY( m_bmpRibbonGroupBkQATB[0].LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_BUTTON_QATB_NORMAL_BK_R1) ) );
- m_bmpRibbonGroupBkQATB[0].PreMultiplyRGBChannels( false );
- VERIFY( m_bmpRibbonGroupBkQATB[1].LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_BUTTON_QATB_HOVER_BK_R1) ) );
- m_bmpRibbonGroupBkQATB[1].PreMultiplyRGBChannels( false );
- VERIFY( m_bmpRibbonGroupBkQATB[2].LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_GROUP_BUTTON_QATB_PRESSED_BK_R1) ) );
- m_bmpRibbonGroupBkQATB[2].PreMultiplyRGBChannels( false );
- m_bmpRibbonGroupBkQATB[3] = m_bmpRibbonGroupBkQATB[1];
- m_nRibbonSeparatorDrawModeH = INT( CExtBitmap::__EDM_STRETCH );
- m_nRibbonSeparatorDrawModeV = INT( CExtBitmap::__EDM_STRETCH );
- m_rcRibbonSeparatorPaddingH.SetRect( 0, 0, 0, 0 );
- VERIFY(
- m_bmpRibbonSeparatorH.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_SEPARATOR_H_R1)
- )
- );
- VERIFY( m_bmpRibbonSeparatorH.Make32() );
- m_bmpRibbonSeparatorH.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_rcRibbonSeparatorPaddingV.SetRect( 0, 0, 0, 0 );
- VERIFY(
- m_bmpRibbonSeparatorV.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_SEPARATOR_V_R1)
- )
- );
- VERIFY( m_bmpRibbonSeparatorV.Make32() );
- m_bmpRibbonSeparatorV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_rcRibbonPaddingQACEB.SetRect( 3, 3, 3, 3 );
- m_nRibbonHeightOfQACEB = 22;
- m_nIdxRibbonQACEB_Normal = 3;
- m_nIdxRibbonQACEB_Hover = 0;
- m_nIdxRibbonQACEB_Pressed = 1;
- m_nIdxRibbonQACEB_Selected = 2;
- VERIFY(
- m_bmpArrRibbonQACEB.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_QATB_CEB_R1)
- )
- );
- m_bmpArrRibbonQACEB.PreMultiplyRGBChannels( false );
- //m_bmpArrRibbonQACEB.PreMultipliedRGBChannelsSet( true );
- m_nRibbonEmbeddedCaptionTextAlignmentFlags = (DT_SINGLELINE|DT_CENTER|DT_VCENTER);
- //m_bRibbonFileButtonItegrationSupported = false;
- //m_nRibbonFileButtonMenuIntersectionHeight = 20;
- m_nQatbAdditionalSpaceAtRightDWM = 0;
- // INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
- // INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
- // CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
- m_rcRibbonNcCornerLeftCP.SetRect( 53, 2, 2, 2 );
- m_rcRibbonNcCornerRightCP.SetRect( 2, 2, 42, 2 );
- VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_FILE_BUTTON) ) );
- //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
- m_bmpArrRibbonFileButton.PreMultiplyRGBChannels( true );
- m_nRibbonFileButtonHeight = m_bmpArrRibbonFileButton.GetSize().cy / 3;
- m_rcPaddingRibbonQuickAccessBarBkAtTheBottom.SetRect( 0, 1, 0, 1 );
- VERIFY( m_bmpRibbonQuickAccessBarBkAtTheBottom.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_QATB_BK_R1) ) );
- m_nRibbonHeightOfOneDLB = 14;
- m_nDlbIdxDisabled = m_nDlbIdxNormal = 0;
- m_nDlbIdxHover = 1;
- m_nDlbIdxPressed = 2;
- rcRibbonContentPaddingDLB.SetRect( 2, 2, 2, 2 );
- VERIFY( m_arrBmpRibbonDLB.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_GCB_R1) ) );
- //m_arrBmpRibbonDLB.PreMultipliedRGBChannelsSet( true );
- m_arrBmpRibbonDLB.PreMultiplyRGBChannels( false );
- m_clrRibbonGalleryInplaceBorderNormal = m_clrRibbonGalleryInplaceBorderHover = RGB(198,202,205);
- m_clrRibbonGalleryInplaceBkgndNormal = m_clrRibbonGalleryInplaceBkgndHover = RGB(255,255,255);
- m_rcRibbonGalleryScrollFill = RGB(255,255,255);
- m_rcRibbonGalleryScrollButtonPadding.SetRect( 3, 3, 3, 3 );
- m_nHeightRibbonGalleryScrollButton = -1; //20;
- m_nIndexRibbonGalleryScrollButtonNormal = 0;
- m_nIndexRibbonGalleryScrollButtonHover = 1;
- m_nIndexRibbonGalleryScrollButtonPressed = 2;
- m_nIndexRibbonGalleryScrollButtonDisabled = 3;
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonDown.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RGIBTN_DOWN_R1)
- )
- );
- m_bmpArrRibbonGalleryScrollButtonDown.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonUp.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RGIBTN_UP_R1)
- )
- );
- m_bmpArrRibbonGalleryScrollButtonUp.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrRibbonGalleryScrollButtonMenu.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RGIBTN_MENU_R1)
- )
- );
- m_bmpArrRibbonGalleryScrollButtonMenu.PreMultipliedRGBChannelsSet( true );
- #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
- VERIFY( m_bmpRibbonDDA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_DDA_R1) ) );
- VERIFY( m_bmpRibbonDDA.Make32() );
- m_bmpRibbonDDA.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- m_rcRibbonPaddingComboBoxDropDown.SetRect( 2, 2, 2, 2 );
- VERIFY( m_bmpArrRibbonComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_COMBO_BOX_BUTTON_R1) ) );
- m_bmpArrRibbonComboBoxDropDown.PreMultipliedRGBChannelsSet( true );
- // buttons 2010
- m_nHeightOfButtonLSM = 66;
- m_nHeightOfButtonLSXM = 39;
- m_nHeightOfButtonLSXB = 27;
- // tool buttons 2010
- m_rcPaddingOfButtonTS.SetRect( 3, 3, 3, 3 );
- m_arrIndicesButtonTS[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonTS[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonTS[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonTS[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonTS[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonTS[INT(__E07BI_INDETERMINATE)] = 4;
- m_rcPaddingOfButtonSS.SetRect( 3, 3, 3, 3 );
- m_arrIndicesButtonSS_Left[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonSS_Left[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonSS_Left[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonSS_Left[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonSS_Left[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonSS_Left[INT(__E07BI_INDETERMINATE)] = 4;
- m_arrIndicesButtonSS_Right[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonSS_Right[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonSS_Right[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonSS_Right[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonSS_Right[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonSS_Right[INT(__E07BI_INDETERMINATE)] = 4;
- m_rcPaddingOfButtonLSM.SetRect( 4, 4, 4, 4 );
- m_arrIndicesButtonLSM[INT(__E07BI_NORMAL)] = -1;
- m_arrIndicesButtonLSM[INT(__E07BI_HOVER)] = 0;
- m_arrIndicesButtonLSM[INT(__E07BI_PRESSED)] = 1;
- m_arrIndicesButtonLSM[INT(__E07BI_HDD)] = 2;
- m_arrIndicesButtonLSM[INT(__E07BI_SEL_T)] = 3;
- m_arrIndicesButtonLSM[INT(__E07BIX_INDETERMINATE)] = 4;
- // m_rcPaddingOfButtonLSB.SetRect( 4, 4, 4, 4 );
- // m_arrIndicesButtonLSB[INT(__E07BI_NORMAL)] = -1;
- // m_arrIndicesButtonLSB[INT(__E07BI_HOVER)] = 0;
- // m_arrIndicesButtonLSB[INT(__E07BI_PRESSED)] = 1;
- // m_arrIndicesButtonLSB[INT(__E07BI_HDD)] = 2;
- // m_arrIndicesButtonLSB[INT(__E07BI_SEL_T)] = 3;
- // m_arrIndicesButtonLSB[INT(__E07BI_INDETERMINATE)] = 4;
- m_rcPaddingOfButtonLSXM.SetRect( 4, 4, 4, 4 );
- m_arrIndicesButtonLSXM[INT(__E07BIX_NORMAL)] = -1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER)] = 0;
- m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER2)] = 0;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED)] = 1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED2)] = 1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED3)] = 1;
- m_arrIndicesButtonLSXM[INT(__E07BIX_INDETERMINATE)] = 5;
- m_arrIndicesButtonLSXM[INT(__E07BIX_SELECTED)] = 3;
- m_rcPaddingOfButtonLSXB.SetRect( 4, 4, 4, 4 );
- m_arrIndicesButtonLSXB[INT(__E07BIX_NORMAL)] = -1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER)] = 0;
- m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER2)] = 0;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED)] = 1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED2)] = 1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED3)] = 1;
- m_arrIndicesButtonLSXB[INT(__E07BIX_INDETERMINATE)] = 5;
- m_arrIndicesButtonLSXB[INT(__E07BIX_SELECTED)] = 3;
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_SOLID)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SOLID_R1)
- )
- );
- m_bmpArrButtonTS[INT(__EBTSA_SOLID)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_LEFT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SOLID_R1)
- )
- );
- m_bmpArrButtonTS[INT(__EBTSA_LEFT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SOLID_R1)
- )
- );
- m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SOLID_R1)
- )
- );
- m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_SMALL_LEFT_R1)
- )
- );
- m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_SMALL_RIGHT_R1)
- )
- );
- m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
- m_bmpArrButtonSS_simple = m_bmpArrButtonSS_DD[ INT(__EBSSA_LEFT) ];
- if( ! m_bmpArrButtonSS_simple.IsEmpty() )
- {
- CSize _sizeBmp = m_bmpArrButtonSS_simple.GetSize();
- INT nY = 0, nXRange = _sizeBmp.cx / 2;
- for( ; nY < _sizeBmp.cy; nY ++ )
- {
- INT nXSrc = nXRange - 1, nXDst = _sizeBmp.cx - nXRange;
- for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
- {
- RGBQUAD _pixel;
- VERIFY( m_bmpArrButtonSS_simple.GetPixel( nXSrc, nY, _pixel ) );
- VERIFY( m_bmpArrButtonSS_simple.SetPixel( nXDst, nY, _pixel ) );
- } // for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
- } // for( ; nY < _sizeBmp.cy; nY ++ )
- } // if( m_bmpArrButtonSS_simple.IsEmpty() )
- VERIFY(
- m_bmpArrButtonLSM.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_LARGE_ALL_R1)
- )
- );
- m_bmpArrButtonLSM.PreMultipliedRGBChannelsSet( true );
- // VERIFY(
- // m_bmpArrButtonLSB.LoadBMP_Resource(
- // MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_LARGE_BOTTOM_R1)
- // )
- // );
- // m_bmpArrButtonLSB.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonLSXM.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_LARGE_TOP_R1)
- )
- );
- m_bmpArrButtonLSXM.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpArrButtonLSXB.LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_BTN_PART_LARGE_BOTTOM_R1)
- )
- );
- m_bmpArrButtonLSXB.PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SEPARATOR_HOVER_R1)
- )
- );
- m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2010_OFFICE_RIBBON_TB_SEPARATOR_PRESSED_R1)
- )
- );
- m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].PreMultipliedRGBChannelsSet( true );
- VERIFY(
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_HOVER_R1)
- )
- );
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].Make32();
- m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY(
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].LoadBMP_Resource(
- MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_PRESSED_R1)
- )
- );
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].Make32();
- m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
- VERIFY( m_bmpRibbonMenuResizingMarginHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_HV_OBSIDIAN) ) );
- VERIFY( m_bmpRibbonMenuResizingMarginV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_V_OBSIDIAN) ) );
- VERIFY( m_bmpRibbonMenuResizingGripperHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_HV_OBSIDIAN) ) );
- m_bmpRibbonMenuResizingGripperHV.Make32();