ExtPaintManager.cpp
上传用户:sesekoo
上传日期:2020-07-18
资源大小:21543k
文件大小:1653k
源码类别:

界面编程

开发平台:

Visual C++

  1. } // for( ; nY < _sizeBmp.cy; nY ++ )
  2. } // if( m_bmpArrButtonSS_simple.IsEmpty() )
  3. VERIFY(
  4. m_bmpArrButtonLSM.LoadBMP_Resource(
  5. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_ALL_R2) // IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2
  6. )
  7. );
  8. // m_bmpArrButtonLSM.PreMultipliedRGBChannelsSet( true );
  9. // VERIFY(
  10. // m_bmpArrButtonLSB.LoadBMP_Resource(
  11. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  12. // )
  13. // );
  14. // m_bmpArrButtonLSB.PreMultipliedRGBChannelsSet( true );
  15. VERIFY(
  16. m_bmpArrButtonLSXM.LoadBMP_Resource(
  17. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2)
  18. )
  19. );
  20. m_bmpArrButtonLSXM.PreMultipliedRGBChannelsSet( true );
  21. VERIFY(
  22. m_bmpArrButtonLSXB.LoadBMP_Resource(
  23. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  24. )
  25. );
  26. m_bmpArrButtonLSXB.PreMultipliedRGBChannelsSet( true );
  27. VERIFY(
  28. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].LoadBMP_Resource(
  29. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_HOVER_R2)
  30. )
  31. );
  32. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].Make32();
  33. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  34. VERIFY(
  35. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].LoadBMP_Resource(
  36. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_PRESSED_R2)
  37. )
  38. );
  39. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].Make32();
  40. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  41. VERIFY(
  42. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].LoadBMP_Resource(
  43. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_HOVER_R2)
  44. )
  45. );
  46. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].Make32();
  47. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  48. VERIFY(
  49. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].LoadBMP_Resource(
  50. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_PRESSED_R2)
  51. )
  52. );
  53. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].Make32();
  54. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  55. VERIFY( m_bmpRibbonMenuResizingMarginHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_HV_LUNA_BLUE) ) );
  56. VERIFY( m_bmpRibbonMenuResizingMarginV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_V_LUNA_BLUE) ) );
  57. VERIFY( m_bmpRibbonMenuResizingGripperHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_HV_LUNA_BLUE) ) );
  58. m_bmpRibbonMenuResizingGripperHV.Make32();
  59. m_bmpRibbonMenuResizingGripperHV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  60. VERIFY( m_bmpRibbonMenuResizingGripperV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_V_LUNA_BLUE) ) );
  61. m_bmpRibbonMenuResizingGripperV.Make32();
  62. m_bmpRibbonMenuResizingGripperV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  63. m_clrRibbonModeMenuTextNormal = RGB(20,20,90);
  64. VERIFY(
  65. m_bmpRibbonModeMenuBorder.LoadBMP_Resource(
  66. MAKEINTRESOURCE(IDB_EXT_2007_MENU_BORDER_R2)
  67. )
  68. );
  69. m_bmpRibbonModeMenuBorder.Make32();
  70. m_bmpRibbonModeMenuBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  71. m_clrMenuCaptionText = RGB(20,20,90);
  72. m_rcMenuCaptionBmpPadding.SetRect( 0, 2, 0, 2 );
  73. VERIFY(
  74. m_bmpMenuCaptionBk.LoadBMP_Resource(
  75. MAKEINTRESOURCE(IDB_EXT_2007_MENU_CAPTION_BK_R2_LUNA_BLUE)
  76. )
  77. );
  78. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 12, 6, 29 );
  79. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R2_LUNA_BLUE) ) );
  80. m_bmpRibbonFileMenuBigBorder.Make32();
  81. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  82. m_rcPaddingRibbonFileMenuOptionsButton.SetRect( 2, 2, 2, 2 );
  83. VERIFY(
  84. m_bmpRibbonFileMenuOptionsButtonCold.LoadBMP_Resource(
  85. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_COLD_R2_LUNA_BLUE)
  86. )
  87. );
  88. m_bmpRibbonFileMenuOptionsButtonCold.Make32();
  89. m_bmpRibbonFileMenuOptionsButtonCold.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  90. VERIFY(
  91. m_bmpRibbonFileMenuOptionsButtonHot.LoadBMP_Resource(
  92. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_HOT_R2)
  93. )
  94. );
  95. m_bmpRibbonFileMenuOptionsButtonHot.Make32();
  96. m_bmpRibbonFileMenuOptionsButtonHot.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  97. VERIFY( m_bmpResizingGripper.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RESIZING_GRIPPER_R2_LUNA_BLUE) ) );
  98. m_bmpResizingGripper.PreMultipliedRGBChannelsSet( true );
  99. // spin bitmaps
  100. VERIFY( m_arrBmpSpinArrowDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_DOWN_LUNA_BLUE) ) );
  101. VERIFY( m_arrBmpSpinArrowUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_UP_LUNA_BLUE) ) );
  102. VERIFY( m_arrBmpSpinDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_DOWN_LUNA_BLUE) ) );
  103. VERIFY( m_arrBmpSpinUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_UP_LUNA_BLUE) ) );
  104. #if (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  105. m_bShortcutListUseDockerBkgnd = true;
  106. #endif // (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  107. }
  108. CExtPaintManagerOffice2007_R2_Silver::CExtPaintManagerOffice2007_R2_Silver()
  109. {
  110. m_clrFillHint = RGB(244,247,251);
  111. m_clrAccentHint = RGB(255,227,140);
  112. INT nBmpArrWalkIndex;
  113. nBmpArrWalkIndex;
  114. //m_clrIconAlphaColor = RGB(128,128,128); // not needed
  115. //m_clrForceSplitterBk = RGB(83,83,83);
  116. m_clrDCA1 = RGB(200,203,211);
  117. m_clrDCA2 = RGB(200,203,211);
  118. m_clrDCA3 = RGB(200,203,211);
  119. m_bDocumentClientAreaBkgndR2 = true;
  120. VERIFY( m_bmpDCA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_DCA_SILVER) ) );
  121. m_clrCustomDropDownGlyphEnabled = RGB(76,83,92);
  122. m_clrCustomDropDownGlyphDisabled = RGB(141,141,141);
  123. m_clrDockingFrameDark = RGB(122, 121, 153);
  124. m_clrFloatingToolbarGripperSolid = RGB(122, 121, 153);
  125. m_clrDockingFrameCaptionTextActive = RGB(76,83,92);
  126. m_clrDockingFrameCaptionTextInactive = RGB(76,83,92);
  127. m_clrDockingFrameCaptionTextFloatingFixed = RGB(255,255,255);
  128. m_clrDockingCaptionShapeFixedNormal =  RGB(0,0,0);
  129. m_rcNcFrameBordersActive.SetRect( 3, 4, 3, 2 );
  130. m_rcNcFrameBordersInactive.SetRect( 3, 4, 3, 2 );
  131. m_nCaptionHeightActive = m_nCaptionHeightInactive = 26;
  132. VERIFY( m_bmpNcFrameActive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_ACTIVE_SILVER) ) );
  133. VERIFY( m_bmpNcFrameInactive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_INACTIVE_SILVER) ) );
  134. VERIFY( m_bmpNcFrameActive.Make32() );
  135. VERIFY( m_bmpNcFrameInactive.Make32() );
  136. m_bmpNcFrameActive.AlphaColor( m_clrTransparentNcFrameActive, RGB(0,0,0), 0 );
  137. m_bmpNcFrameInactive.AlphaColor( m_clrTransparentNcFrameInactive, RGB(0,0,0), 0 );
  138. m_clrNcFrameTextActive = RGB(92,98,106);
  139. m_clrNcFrameTextInactive = RGB(105,112,121);
  140. VERIFY( m_bmpNcButtonBkHover.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_HOVER_LUNA_BLUE) ) );
  141. m_bmpNcButtonBkHover.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  142. VERIFY( m_bmpNcButtonBkPressed.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_PRESSED_LUNA_BLUE) ) );
  143. m_bmpNcButtonBkPressed.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  144. VERIFY( m_bmpArrNcButtonsHelp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_HELP_LUNA_BLUE) ) );
  145. m_bmpArrNcButtonsHelp.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  146. VERIFY( m_bmpArrNcButtonsClose.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_CLOSE_LUNA_BLUE) ) );
  147. m_bmpArrNcButtonsClose.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  148. VERIFY( m_bmpArrNcButtonsMaximize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MAXIMIZE_LUNA_BLUE) ) );
  149. m_bmpArrNcButtonsMaximize.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  150. VERIFY( m_bmpArrNcButtonsRestore.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_RESTORE_LUNA_BLUE) ) );
  151. m_bmpArrNcButtonsRestore.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  152. VERIFY( m_bmpArrNcButtonsMinimize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MINIMIZE_LUNA_BLUE) ) );
  153. m_bmpArrNcButtonsMinimize.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  154. #if (!defined __EXT_MFC_NO_STATUSBAR)
  155. m_rcStatusBkPadding.SetRect( 0, 1, 0, 1 );
  156. VERIFY( m_bmpStatusBkLight.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_LIGHT_SILVER) ) );
  157. // m_bmpStatusBkLight.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  158. VERIFY( m_bmpStatusBkDark.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_DARK_SILVER) ) );
  159. // m_bmpStatusBkDark.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  160. m_rcStatusSeparatorPadding.SetRect( 0, 1, 0, 1 );
  161. VERIFY( m_bmpStatusSeparator.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_SEPARATOR_SILVER) ) );
  162. // m_bmpStatusSeparator.AdjustHLS( RGB(255,0,255), RGB(0,0,0), 0.0, 0.0, -1.0 );
  163. m_clrStatusPaneTextColorDisabled = RGB(128,128,128);
  164. m_clrStatusPaneTextColorNormal = RGB(32,32,32);
  165. #endif // (!defined __EXT_MFC_NO_STATUSBAR)
  166. #if (!defined __EXT_MFC_NO_TAB_CTRL)
  167. m_clrTabTextNormal = RGB(84,84,84);
  168. m_clrTabTextSelected =  RGB(128,128,128);
  169. m_nIdxTabShapeHover = 1;
  170. m_nIdxTabShapePressed = 2;
  171. m_nIdxTabShapeSelected = 3;
  172. m_nIdxTabShapeSelectedHover = 4;
  173. m_arrSizeTabShape[__ETSOI_TOP].cx
  174. = m_arrSizeTabShape[__ETSOI_BOTTOM].cx
  175. = m_arrSizeTabShape[__ETSOI_LEFT].cy
  176. = m_arrSizeTabShape[__ETSOI_RIGHT].cy
  177. = 57;
  178. m_arrSizeTabShape[__ETSOI_TOP].cy
  179. = m_arrSizeTabShape[__ETSOI_BOTTOM].cy
  180. = m_arrSizeTabShape[__ETSOI_LEFT].cx
  181. = m_arrSizeTabShape[__ETSOI_RIGHT].cx
  182. = 24;
  183. m_arrRectTabShapePadding[__ETSOI_TOP].SetRect( 6, 3, 6, 3 );
  184. m_arrRectTabShapePadding[__ETSOI_BOTTOM].SetRect( 6, 3, 6, 3 );
  185. m_arrRectTabShapePadding[__ETSOI_LEFT].SetRect( 3, 6, 3, 6 );
  186. m_arrRectTabShapePadding[__ETSOI_RIGHT].SetRect( 3, 6, 3, 6 );
  187. VERIFY(
  188. m_arrBmpTabShapeNormal[__ETSOI_TOP].LoadBMP_Resource(
  189. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SHAPE_ARR_SILVER )
  190. )
  191. );
  192. VERIFY( m_arrBmpTabShapeNormal[__ETSOI_TOP].Make32() );
  193. // m_arrBmpTabShapeNormal[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  194. VERIFY(
  195. m_arrBmpTabShapeNormal[__ETSOI_BOTTOM].CreateRotated9xStack(
  196. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  197. 180,
  198. 5,
  199. m_arrSizeTabShape[__ETSOI_TOP].cx,
  200. m_arrSizeTabShape[__ETSOI_TOP].cy,
  201. false,
  202. false
  203. )
  204. );
  205. VERIFY(
  206. m_arrBmpTabShapeNormal[__ETSOI_LEFT].CreateRotated9xStack(
  207. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  208. 270,
  209. 5,
  210. m_arrSizeTabShape[__ETSOI_TOP].cx,
  211. m_arrSizeTabShape[__ETSOI_TOP].cy,
  212. false,
  213. false
  214. )
  215. );
  216. VERIFY(
  217. m_arrBmpTabShapeNormal[__ETSOI_RIGHT].CreateRotated9xStack(
  218. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  219. 90,
  220. 5,
  221. m_arrSizeTabShape[__ETSOI_TOP].cx,
  222. m_arrSizeTabShape[__ETSOI_TOP].cy,
  223. false,
  224. false
  225. )
  226. );
  227. VERIFY(
  228. m_arrBmpTabShapeSelArea[__ETSOI_TOP].LoadBMP_Resource(
  229. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SHAPE_ARR_SILVER_SEL_AREA )
  230. )
  231. );
  232. VERIFY( m_arrBmpTabShapeSelArea[__ETSOI_TOP].Make32() );
  233. m_arrBmpTabShapeSelArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  234. VERIFY(
  235. m_arrBmpTabShapeSelArea[__ETSOI_BOTTOM].CreateRotated9xStack(
  236. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  237. 180,
  238. 5,
  239. m_arrSizeTabShape[__ETSOI_TOP].cx,
  240. m_arrSizeTabShape[__ETSOI_TOP].cy,
  241. false,
  242. false
  243. )
  244. );
  245. VERIFY(
  246. m_arrBmpTabShapeSelArea[__ETSOI_LEFT].CreateRotated9xStack(
  247. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  248. 270,
  249. 5,
  250. m_arrSizeTabShape[__ETSOI_TOP].cx,
  251. m_arrSizeTabShape[__ETSOI_TOP].cy,
  252. false,
  253. false
  254. )
  255. );
  256. VERIFY(
  257. m_arrBmpTabShapeSelArea[__ETSOI_RIGHT].CreateRotated9xStack(
  258. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  259. 90,
  260. 5,
  261. m_arrSizeTabShape[__ETSOI_TOP].cx,
  262. m_arrSizeTabShape[__ETSOI_TOP].cy,
  263. false,
  264. false
  265. )
  266. );
  267. m_arrRectTabAreaPadding[__ETSOI_TOP].SetRect( 3, 3, 3, 3 );
  268. m_arrRectTabAreaPadding[__ETSOI_BOTTOM].SetRect( 3, 3, 3, 3 );
  269. m_arrRectTabAreaPadding[__ETSOI_LEFT].SetRect( 3, 3, 3, 3 );
  270. m_arrRectTabAreaPadding[__ETSOI_RIGHT].SetRect( 3, 3, 3, 3 );
  271. m_arrTabAreaMargins[__ETSOI_TOP] = 1;
  272. m_arrTabAreaMargins[__ETSOI_BOTTOM] = 1;
  273. m_arrTabAreaMargins[__ETSOI_LEFT] = 1;
  274. m_arrTabAreaMargins[__ETSOI_RIGHT] = 1;
  275. VERIFY(
  276. m_arrBmpTabArea[__ETSOI_TOP].LoadBMP_Resource(
  277. MAKEINTRESOURCE( IDB_EXT_2007_TAB_AREA_BK_SILVER )
  278. )
  279. );
  280. VERIFY( m_arrBmpTabArea[__ETSOI_TOP].Make32() );
  281. CSize _sizeTabArea = m_arrBmpTabArea[__ETSOI_TOP].GetSize();
  282. m_arrBmpTabArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  283. VERIFY(
  284. m_arrBmpTabArea[__ETSOI_BOTTOM].CreateRotated9xStack(
  285. m_arrBmpTabArea[__ETSOI_TOP],
  286. 180,
  287. 1,
  288. _sizeTabArea.cx,
  289. _sizeTabArea.cy,
  290. false,
  291. false
  292. )
  293. );
  294. VERIFY(
  295. m_arrBmpTabArea[__ETSOI_LEFT].CreateRotated9xStack(
  296. m_arrBmpTabArea[__ETSOI_TOP],
  297. 270,
  298. 1,
  299. _sizeTabArea.cx,
  300. _sizeTabArea.cy,
  301. false,
  302. false
  303. )
  304. );
  305. VERIFY(
  306. m_arrBmpTabArea[__ETSOI_RIGHT].CreateRotated9xStack(
  307. m_arrBmpTabArea[__ETSOI_TOP],
  308. 90,
  309. 1,
  310. _sizeTabArea.cx,
  311. _sizeTabArea.cy,
  312. false,
  313. false
  314. )
  315. );
  316. m_arrSizeTabSeparator[__ETSOI_TOP].cx
  317. = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cx
  318. = m_arrSizeTabSeparator[__ETSOI_LEFT].cy
  319. = m_arrSizeTabSeparator[__ETSOI_RIGHT].cy
  320. = 1;
  321. m_arrSizeTabSeparator[__ETSOI_TOP].cy
  322. = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cy
  323. = m_arrSizeTabSeparator[__ETSOI_LEFT].cx
  324. = m_arrSizeTabSeparator[__ETSOI_RIGHT].cx
  325. = 24;
  326. m_arrRectTabSeparatorPadding[__ETSOI_TOP].SetRect( 0, 2, 0, 2 );
  327. m_arrRectTabSeparatorPadding[__ETSOI_BOTTOM].SetRect( 0, 2, 0, 2 );
  328. m_arrRectTabSeparatorPadding[__ETSOI_LEFT].SetRect( 2, 0, 2, 0 );
  329. m_arrRectTabSeparatorPadding[__ETSOI_RIGHT].SetRect( 2, 0, 2, 0 );
  330. VERIFY(
  331. m_arrBmpTabSeparator[__ETSOI_TOP].LoadBMP_Resource(
  332. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SEPARATOR_SILVER )
  333. )
  334. );
  335. VERIFY( m_arrBmpTabSeparator[__ETSOI_TOP].Make32() );
  336. m_arrBmpTabSeparator[__ETSOI_TOP].PreMultiplyRGBChannels();
  337. m_arrBmpTabSeparator[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  338. VERIFY(
  339. m_arrBmpTabSeparator[__ETSOI_BOTTOM].CreateRotated9xStack(
  340. m_arrBmpTabSeparator[__ETSOI_TOP],
  341. 180,
  342. 1,
  343. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  344. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  345. false,
  346. false
  347. )
  348. );
  349. VERIFY(
  350. m_arrBmpTabSeparator[__ETSOI_LEFT].CreateRotated9xStack(
  351. m_arrBmpTabSeparator[__ETSOI_TOP],
  352. 270,
  353. 1,
  354. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  355. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  356. false,
  357. false
  358. )
  359. );
  360. VERIFY(
  361. m_arrBmpTabSeparator[__ETSOI_RIGHT].CreateRotated9xStack(
  362. m_arrBmpTabSeparator[__ETSOI_TOP],
  363. 90,
  364. 1,
  365. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  366. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  367. false,
  368. false
  369. )
  370. );
  371. #endif // (!defined __EXT_MFC_NO_TAB_CTRL)
  372. VERIFY(
  373. m_bmpArrStatesCheckBox.LoadBMP_Resource(
  374. MAKEINTRESOURCE( IDB_EXT_2007_CHECK_BOX_R2_OBSIDIAN )
  375. )
  376. );
  377. VERIFY(
  378. m_bmpArrStatesRadioButton.LoadBMP_Resource(
  379. MAKEINTRESOURCE( IDB_EXT_2007_RADIO_BUTTON_R2 )
  380. )
  381. );
  382. m_clrMenuItemLeftAreaMarginL = RGB(197,197,197);
  383. m_clrMenuItemLeftAreaMarginR = RGB(245,245,245);
  384. VERIFY(
  385. m_bmpMenuItemLargeLeft.LoadBMP_Resource(
  386. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_LARGE_LEFT )
  387. )
  388. );
  389. m_bmpMenuItemLargeLeft.PreMultipliedRGBChannelsSet( true );
  390. VERIFY(
  391. m_bmpMenuItemLargeRight.LoadBMP_Resource(
  392. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_LARGE_RIGHT )
  393. )
  394. );
  395. m_bmpMenuItemLargeRight.PreMultipliedRGBChannelsSet( true );
  396. VERIFY(
  397. m_bmpMenuItemSmallLeft.LoadBMP_Resource(
  398. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_SMALL_LEFT )
  399. )
  400. );
  401. m_bmpMenuItemSmallLeft.PreMultipliedRGBChannelsSet( true );
  402. VERIFY(
  403. m_bmpMenuItemSmallRight.LoadBMP_Resource(
  404. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_SMALL_RIGHT )
  405. )
  406. );
  407. m_bmpMenuItemSmallRight.PreMultipliedRGBChannelsSet( true );
  408. VERIFY(
  409. m_bmpMenuArrow.LoadBMP_Resource(
  410. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_ARROW )
  411. )
  412. );
  413. m_sizeMenuCheckAreaChecked.cx = 16;
  414. m_sizeMenuCheckAreaChecked.cy = 16;
  415. m_sizeMenuCheckAreaUnchecked.cx = 20;
  416. m_sizeMenuCheckAreaUnchecked.cy = 20;
  417. m_arrRectMenuCheckAreaCheckedPadding[0].SetRect( 1, 1, 1, 1 );
  418. m_arrRectMenuCheckAreaCheckedPadding[1].SetRect( 1, 1, 1, 1 );
  419. m_arrRectMenuCheckAreaUncheckedPadding[0].SetRect( 2, 2, 2, 2 );
  420. m_arrRectMenuCheckAreaUncheckedPadding[1].SetRect( 2, 2, 2, 2 );
  421. VERIFY( m_bmpMenuCheckAreaChecked.LoadBMP_Resource(   MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_CHECKED_R2   ) ) );
  422. VERIFY( m_bmpMenuCheckAreaUnchecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_UNCHECKED_R2 ) ) );
  423. #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  424. m_arrClrPnCaptNormal[0]  = RGB(235,238,250);
  425. m_arrClrPnCaptNormal[1]  = RGB(215,219,229);
  426. m_arrClrPnCaptNormal[2]  = RGB(197,199,209);
  427. m_arrClrPnCaptNormal[3]  = RGB(212,216,226);
  428. m_arrClrPnSplitter[0]    = RGB(255,255,255);
  429. m_arrClrPnSplitter[1]    = RGB(120,119,151);
  430. m_clrPnCaptText  = RGB(21,66,139);
  431. m_arrClrPnItemText[0]    = RGB(0,0,0);
  432. m_arrClrPnItemText[1]    = RGB(76,83,92);
  433. m_clrPnConfigButton  = RGB(101,104,112); 
  434. #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  435. VERIFY( m_bmpArrComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_COMBO_BOX_BUTTON_R2_OBSIDIAN ) ) );
  436. m_arrClrComboBoxBorder[0] = RGB(169,177,184);
  437. m_arrClrComboBoxBorder[1] = RGB(169,177,184);
  438. m_arrClrComboBoxBorder[2] = RGB(169,177,184);
  439. m_arrClrComboBoxBorder[3] = RGB(169,177,184);
  440. CRect SbSkinDataPaddingH( 5, 3, 5, 3 ), SbSkinDataPaddingV( 3, 5, 3, 5 );
  441. CRect rcEntirePaddingRH( 0, 2, 0, 2 ), rcEntirePaddingRV( 2, 0, 2, 0 );
  442. CRect rcEntirePaddingCH( 1, 1, 1, 1 ), rcEntirePaddingCV( 1, 1, 1, 1 );
  443. m_SbSkinDataT_Zoom.Load2007_Zoom(
  444. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  445. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_TOP
  446. );
  447. m_SbSkinDataB_Zoom.Load2007_Zoom(
  448. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  449. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_BOTTOM
  450. );
  451. m_SbSkinDataL_Zoom.Load2007_Zoom(
  452. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  453. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_LEFT
  454. );
  455. m_SbSkinDataR_Zoom.Load2007_Zoom(
  456. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  457. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_RIGHT
  458. );
  459. m_SbSkinDataH_Light.Load2007_R2(
  460. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_HORZ_OBSIDIAN,
  461. 15,
  462. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_HORZ,
  463. 8,
  464. SbSkinDataPaddingH,
  465. COLORREF(-1L), // RGB(117,150,192),
  466. COLORREF(-1L), // RGB(91,99,116),
  467. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  468. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  469. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  470. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  471. true,
  472. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_LIGHT,
  473. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_LIGHT,
  474. rcEntirePaddingRH,
  475. rcEntirePaddingCH
  476. );
  477. m_SbSkinDataV_Light.Load2007_R2(
  478. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_VERT_OBSIDIAN,
  479. 21,
  480. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_VERT,
  481. 8,
  482. SbSkinDataPaddingV,
  483. COLORREF(-1L), // RGB(117,150,192),
  484. COLORREF(-1L), // RGB(91,99,116),
  485. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  486. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  487. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  488. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  489. false,
  490. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_LIGHT,
  491. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_LIGHT,
  492. rcEntirePaddingRV,
  493. rcEntirePaddingCV
  494. );
  495. m_SbSkinDataH_Dark.Load2007_R2(
  496. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_HORZ_OBSIDIAN,
  497. 15,
  498. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_HORZ,
  499. 8,
  500. SbSkinDataPaddingH,
  501. COLORREF(-1L), // RGB(117,150,192),
  502. COLORREF(-1L), // RGB(91,99,116),
  503. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  504. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  505. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  506. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  507. true,
  508. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_SILVER_DARK,
  509. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_SILVER_DARK,
  510. rcEntirePaddingRH,
  511. rcEntirePaddingCH
  512. );
  513. m_SbSkinDataV_Dark.Load2007_R2(
  514. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_VERT_OBSIDIAN,
  515. 21,
  516. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_VERT,
  517. 8,
  518. SbSkinDataPaddingV,
  519. COLORREF(-1L), // RGB(117,150,192),
  520. COLORREF(-1L), // RGB(91,99,116),
  521. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  522. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  523. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  524. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  525. false,
  526. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_SILVER_DARK,
  527. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_SILVER_DARK,
  528. rcEntirePaddingRV,
  529. rcEntirePaddingCV
  530. );
  531. m_clrGridHeaderBkTop     = RGB(253,253,253);
  532. m_clrGridHeaderBkBottom  = RGB(212,215,220);
  533. m_clrGridHeaderSeparator = RGB(145,153,164);
  534. m_clrGridHeaderSortArrow = RGB(145,153,164);
  535. m_clrGridHeaderBorder    = RGB(145,153,164);
  536. m_clrRgHeaderBkTop     = RGB(253,253,253);
  537. m_clrRgHeaderBkBottom  = RGB(212,215,220);
  538. m_clrRgHeaderSeparator = RGB(145,153,164);
  539. m_clrRgHeaderSortArrow = RGB(145,153,164);
  540. m_clrRgHeaderText      = RGB(0,0,0);
  541. m_clrRgHeaderBorder    = RGB(76,83,92);
  542. #if (!defined __EXT_MFC_NO_REPORTGRIDWND)
  543. m_clrRgGroupAreaBk     = RGB(235,235,235);
  544. m_clrRgGroupAreaText   = RGB(70,70,70);
  545. #endif // (!defined __EXT_MFC_NO_REPORTGRIDWND)
  546. //   m_nTbbLightWeightSimpleGlyphHeightV = 20;
  547. //   m_nTbbLightWeightSDDLeftGlyphHeightV = 23;
  548. //  m_nTbbLightWeightSDDRightGlyphHeightV = 10;
  549. //  VERIFY(
  550. //  m_arrBmpTbbLightWeightSimpleH.LoadBMP_Resource(
  551. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_SIMPLE )
  552. //  )
  553. //  );
  554. //  VERIFY(
  555. //  m_arrBmpTbbLightWeightSDDLeftH.LoadBMP_Resource(
  556. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_LEFT_PART )
  557. //  )
  558. //  );
  559. //  VERIFY(
  560. //  m_arrBmpTbbLightWeightSDDRightH.LoadBMP_Resource(
  561. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_RIGHT_PART )
  562. //  )
  563. //  );
  564. //  //  m_arrBmpTbbLightWeightSimpleH.PreMultipliedRGBChannelsSet( true );
  565. //  //  m_arrBmpTbbLightWeightSDDLeftH.PreMultipliedRGBChannelsSet( true );
  566. //  //  m_arrBmpTbbLightWeightSDDRightH.PreMultipliedRGBChannelsSet( true );
  567. //  VERIFY(
  568. //  m_arrBmpTbbLightWeightSimpleV.CreateRotated9xStack(
  569. //  m_arrBmpTbbLightWeightSimpleH,
  570. //  90,
  571. //  INT(__EPBGT_GLYPH_COUNT),
  572. //  m_arrBmpTbbLightWeightSimpleH.GetSize().cx,
  573. //  m_nTbbLightWeightSimpleGlyphHeightH,
  574. //  false,
  575. //  false
  576. //  )
  577. //  );
  578. //  VERIFY(
  579. //  m_arrBmpTbbLightWeightSDDLeftV.CreateRotated9xStack(
  580. //  m_arrBmpTbbLightWeightSDDLeftH,
  581. //  90,
  582. //  INT(__EPBGT_GLYPH_COUNT),
  583. //  m_arrBmpTbbLightWeightSDDLeftH.GetSize().cx,
  584. //  m_nTbbLightWeightSDDLeftGlyphHeightH,
  585. //  false,
  586. //  false
  587. //  )
  588. //  );
  589. //  VERIFY(
  590. //  m_arrBmpTbbLightWeightSDDRightV.CreateRotated9xStack(
  591. //  m_arrBmpTbbLightWeightSDDRightH,
  592. //  90,
  593. //  INT(__EPBGT_GLYPH_COUNT),
  594. //  m_arrBmpTbbLightWeightSDDRightH.GetSize().cx,
  595. //  m_nTbbLightWeightSDDRightGlyphHeightH,
  596. //  false,
  597. //  false
  598. //  )
  599. //  );
  600.   m_nPushBtnSimpleGlyphHeightV = 20;
  601.   m_nPushBtnSDDLeftGlyphHeightV = 23;
  602. m_nPushBtnSDDRightGlyphHeightV = 10;
  603. VERIFY(
  604. m_arrBmpPushBtnSimpleH.LoadBMP_Resource(
  605. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_SIMPLE )
  606. )
  607. );
  608. VERIFY(
  609. m_arrBmpPushBtnSDDLeftH.LoadBMP_Resource(
  610. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_LEFT_PART )
  611. )
  612. );
  613. VERIFY(
  614. m_arrBmpPushBtnSDDRightH.LoadBMP_Resource(
  615. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_RIGHT_PART )
  616. )
  617. );
  618. //  m_arrBmpPushBtnSimpleH.PreMultipliedRGBChannelsSet( true );
  619. //  m_arrBmpPushBtnSDDLeftH.PreMultipliedRGBChannelsSet( true );
  620. //  m_arrBmpPushBtnSDDRightH.PreMultipliedRGBChannelsSet( true );
  621. VERIFY(
  622. m_arrBmpPushBtnSimpleV.CreateRotated9xStack(
  623. m_arrBmpPushBtnSimpleH,
  624. 90,
  625. INT(__EPBGT_GLYPH_COUNT),
  626. m_arrBmpPushBtnSimpleH.GetSize().cx,
  627. m_nPushBtnSimpleGlyphHeightH,
  628. false,
  629. false
  630. )
  631. );
  632. VERIFY(
  633. m_arrBmpPushBtnSDDLeftV.CreateRotated9xStack(
  634. m_arrBmpPushBtnSDDLeftH,
  635. 90,
  636. INT(__EPBGT_GLYPH_COUNT),
  637. m_arrBmpPushBtnSDDLeftH.GetSize().cx,
  638. m_nPushBtnSDDLeftGlyphHeightH,
  639. false,
  640. false
  641. )
  642. );
  643. VERIFY(
  644. m_arrBmpPushBtnSDDRightV.CreateRotated9xStack(
  645. m_arrBmpPushBtnSDDRightH,
  646. 90,
  647. INT(__EPBGT_GLYPH_COUNT),
  648. m_arrBmpPushBtnSDDRightH.GetSize().cx,
  649. m_nPushBtnSDDRightGlyphHeightH,
  650. false,
  651. false
  652. )
  653. );
  654. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  655. m_nQatbAdditionalSpaceAtRightDWM = 30;
  656. m_clrContractedMargin1 = RGB(220,225,235);
  657. m_clrContractedMargin2 = RGB(128,128,128);
  658. m_nContractedMarginHeight = 2;
  659. m_bRibbonGroupCaptionAtTop = false;
  660. m_bRibbonGroupCaptionAreaHasPadding = true;
  661. m_nRibbonGroupCaptionAreaHeightExpanded = 16;
  662. m_nRibbonGroupCaptionAreaHeightCollapsed = 16;
  663. m_nRibbonCaptionPartHeight = 17;
  664. m_nRibbonGroupIconBkVertOffset = 2;
  665. m_clrRibbonComboBackGroundNormal = RGB(232,232,232);
  666. m_nRibbonTabIntersectionHeight = 1;
  667. m_clrRibbonButtonDisabled = RGB(128,128,128);
  668. m_clrRibbonGroupCaptionTextExpanded = RGB( 84, 84, 84 );
  669. m_nRibbonGroupCaptionTextDF
  670. = m_nRibbonGroupCaptionTextShadowDF
  671. = DT_SINGLELINE|DT_CENTER|DT_VCENTER|DT_END_ELLIPSIS;
  672. m_rcRibbonPageBkPadding.SetRect( 5, 19, 5, 10 );
  673. VERIFY(
  674. m_bmpRibbonPageBk.LoadBMP_Resource(
  675. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_PAGE_BK_R2_SILVER)
  676. )
  677. );
  678. //  m_bmpRibbonPageBk.Make32();
  679. //  m_bmpRibbonPageBk.PreMultipliedRGBChannelsSet( true );
  680. m_rcRibbonGroupPaddingBkExpanded.SetRect( 4, 4, 4, 4 );
  681. VERIFY(
  682. m_bmpRibbonGroupBkExpanded[0].LoadBMP_Resource(
  683. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_NORMAL_BK_R2_SILVER)
  684. )
  685. );
  686. VERIFY(
  687. m_bmpRibbonGroupBkExpanded[1].LoadBMP_Resource(
  688. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_HOVER_BK_R2_SILVER)
  689. )
  690. );
  691. m_rcRibbonGroupPaddingBkCollapsed.SetRect( 4, 18, 4, 4 );
  692. VERIFY(
  693. m_bmpRibbonGroupBkCollapsed[0].LoadBMP_Resource(
  694. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_NORMAL_BK_R2_SILVER)
  695. )
  696. );
  697. VERIFY(
  698. m_bmpRibbonGroupBkCollapsed[1].LoadBMP_Resource(
  699. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_HOVER_BK_R2_SILVER)
  700. )
  701. );
  702. VERIFY(
  703. m_bmpRibbonGroupBkCollapsed[2].LoadBMP_Resource(
  704. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_PRESSED_BK_R2_SILVER)
  705. )
  706. );
  707. VERIFY(
  708. m_bmpRibbonGroupBkCollapsed[3].LoadBMP_Resource(
  709. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_SELECTED_BK_R2)
  710. )
  711. );
  712. INT nBkIndex, nBkCount;
  713. nBkCount = sizeof( m_bmpRibbonGroupBkExpanded ) / sizeof( m_bmpRibbonGroupBkExpanded[0] );
  714. for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  715. {
  716. m_bmpRibbonGroupBkExpanded[nBkIndex].Make32();
  717. m_bmpRibbonGroupBkExpanded[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  718. } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  719. nBkCount = sizeof( m_bmpRibbonGroupBkCollapsed ) / sizeof( m_bmpRibbonGroupBkCollapsed[0] );
  720. for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  721. {
  722. m_bmpRibbonGroupBkCollapsed[nBkIndex].Make32();
  723. m_bmpRibbonGroupBkCollapsed[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  724. } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  725. // VERIFY(
  726. // m_bmpRibbonIconBkCollapsed[0].LoadBMP_Resource(
  727. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_NORMAL_BK_R2_OBSIDIAN)
  728. // )
  729. // );
  730. // VERIFY(
  731. // m_bmpRibbonIconBkCollapsed[1].LoadBMP_Resource(
  732. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_HOVER_BK_R2_OBSIDIAN)
  733. // )
  734. // );
  735. // VERIFY(
  736. // m_bmpRibbonIconBkCollapsed[2].LoadBMP_Resource(
  737. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_PRESSED_BK_R2_OBSIDIAN)
  738. // )
  739. // );
  740. VERIFY(
  741. m_bmpRibbonIconBkCF.LoadBMP_Resource(
  742. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_COLLAPSED_ICON_FRAME_R2_OBSIDIAN)
  743. )
  744. );
  745.   m_bmpRibbonIconBkCF.PreMultiplyRGBChannels( false );
  746. //  m_bmpRibbonIconBkCF.PreMultipliedRGBChannelsSet( true );
  747. m_nRibbonSeparatorDrawModeH = INT( CExtBitmap::__EDM_STRETCH );
  748. m_nRibbonSeparatorDrawModeV = INT( CExtBitmap::__EDM_STRETCH );
  749. m_rcRibbonSeparatorPaddingH.SetRect( 6, 0, 6, 0 );
  750. VERIFY(
  751. m_bmpRibbonSeparatorH.LoadBMP_Resource(
  752. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_H_R2_OBSIDIAN)
  753. )
  754. );
  755. VERIFY( m_bmpRibbonSeparatorH.Make32() );
  756. m_bmpRibbonSeparatorH.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  757. m_rcRibbonSeparatorPaddingV.SetRect( 0, 6, 0, 6 );
  758. VERIFY(
  759. m_bmpRibbonSeparatorV.LoadBMP_Resource(
  760. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_V_R2_OBSIDIAN)
  761. )
  762. );
  763. VERIFY( m_bmpRibbonSeparatorV.Make32() );
  764. m_bmpRibbonSeparatorV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  765. m_nRibbonHeightOfQACEB = 22;
  766. m_nIdxRibbonQACEB_Selected = 3;
  767. VERIFY(
  768. m_bmpArrRibbonQACEB.LoadBMP_Resource(
  769. MAKEINTRESOURCE(IDB_EXT_2007_QATB_CEB_R2_OBSIDIAN)
  770. )
  771. );
  772. //m_bmpArrRibbonQACEB.PreMultipliedRGBChannelsSet( true );
  773. m_clrRibbon_EmbeddedCaptionTextLeft = RGB(100,100,100);
  774. m_clrRibbon_EmbeddedCaptionTextRight = RGB( 65, 115, 175 );;
  775. m_bRibbonFileButtonItegrationSupported = true;
  776. INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
  777. INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
  778. CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
  779. m_rcRibbonNcCornerLeftCP.SetRect( 22, 8, 2, 2 );
  780. m_rcRibbonNcCornerRightCP.SetRect( 2, 8, 22, 2 );
  781. VERIFY(
  782. m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
  783. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R2_SILVER)
  784. )
  785. );
  786. m_bmpRibbonNcCornerActiveLeft.Make32();
  787. m_bmpRibbonNcCornerActiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  788. // m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
  789. m_bmpRibbonNcCornerActiveLeft.Scale(
  790. m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
  791. nCaptionHeightActive,
  792. _fBox
  793. );
  794. VERIFY(
  795. m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
  796. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R2_SILVER)
  797. )
  798. );
  799. m_bmpRibbonNcCornerInactiveLeft.Make32();
  800. m_bmpRibbonNcCornerInactiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  801. // m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
  802. m_bmpRibbonNcCornerInactiveLeft.Scale(
  803. m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
  804. nCaptionHeightInactive,
  805. _fBox
  806. );
  807. VERIFY(
  808. m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
  809. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R2_SILVER)
  810. )
  811. );
  812. m_bmpRibbonNcCornerActiveRight.Make32();
  813. m_bmpRibbonNcCornerActiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  814. // m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
  815. m_bmpRibbonNcCornerActiveRight.Scale(
  816. m_bmpRibbonNcCornerActiveRight.GetSize().cx,
  817. nCaptionHeightActive,
  818. _fBox
  819. );
  820. VERIFY(
  821. m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
  822. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R2_SILVER)
  823. )
  824. );
  825. m_bmpRibbonNcCornerInactiveRight.Make32();
  826. m_bmpRibbonNcCornerInactiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  827. // m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
  828. m_bmpRibbonNcCornerInactiveRight.Scale(
  829. m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
  830. nCaptionHeightInactive,
  831. _fBox
  832. );
  833. VERIFY(
  834. m_bmpRibbonNcCornerHT.LoadBMP_Resource(
  835. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_OBSIDIAN)
  836. )
  837. );
  838. m_bmpRibbonNcCornerHT.Make32();
  839. m_bmpRibbonNcCornerHT.Scale(
  840. m_bmpRibbonNcCornerHT.GetSize().cx,
  841. nCaptionHeightActive,
  842. _fBox
  843. );
  844. VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_R2_OBSIDIAN) ) );
  845. //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
  846. m_rcPaddingRibbonQuickAccessBarBkAtTheBottom.SetRect( 3, 3, 3, 3 );
  847. VERIFY( m_bmpRibbonQuickAccessBarBkAtTheBottom.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_QATB_BK_R2_SILVER) ) );
  848. m_nRibbonHeightOfOneDLB = 14;
  849. m_nDlbIdxDisabled = 3;
  850. m_nDlbIdxNormal = 0;
  851. m_nDlbIdxHover = 1;
  852. m_nDlbIdxPressed = 2;
  853. rcRibbonContentPaddingDLB.SetRect( 2, 2, 2, 2 );
  854. VERIFY( m_arrBmpRibbonDLB.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_GCB_R2_OBSIDIAN) ) );
  855. // m_arrBmpRibbonDLB.PreMultipliedRGBChannelsSet( true );
  856. m_clrRibbonGalleryInplaceBorderNormal = RGB(172,172,172);
  857. m_clrRibbonGalleryInplaceBorderHover  = RGB(172,172,172);
  858. m_clrRibbonGalleryInplaceBkgndNormal  = RGB(232,234,236);
  859. m_clrRibbonGalleryInplaceBkgndHover   = RGB(247,247,247);
  860. m_rcRibbonGalleryScrollFill = RGB(218,226,226);
  861. m_rcRibbonGalleryScrollButtonPadding.SetRect( 4, 4, 4, 4 );
  862. m_nHeightRibbonGalleryScrollButton = -1;
  863. m_nIndexRibbonGalleryScrollButtonDisabled = 4;
  864. m_nIndexRibbonGalleryScrollButtonNormal = 1;
  865. m_nIndexRibbonGalleryScrollButtonHover = 2;
  866. m_nIndexRibbonGalleryScrollButtonPressed = 3;
  867. VERIFY(
  868. m_bmpArrRibbonGalleryScrollButtonDown.LoadBMP_Resource(
  869. MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_DOWN_R2_OBSIDIAN)
  870. )
  871. );
  872. VERIFY(
  873. m_bmpArrRibbonGalleryScrollButtonUp.LoadBMP_Resource(
  874. MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_UP_R2_OBSIDIAN)
  875. )
  876. );
  877. VERIFY(
  878. m_bmpArrRibbonGalleryScrollButtonMenu.LoadBMP_Resource(
  879. MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_MENU_R2_OBSIDIAN)
  880. )
  881. );
  882. #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
  883. VERIFY( m_bmpRibbonDDA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_DDA_R2_OBSIDIAN) ) );
  884. VERIFY( m_bmpRibbonDDA.Make32() );
  885. m_bmpRibbonDDA.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  886. VERIFY( m_bmpArrRibbonComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_COMBO_BOX_BUTTON_R2_SILVER) ) );
  887. // tool buttons 2007
  888. m_arrIndicesButtonTS[INT(__E07BI_NORMAL)] = 0;
  889. m_arrIndicesButtonTS[INT(__E07BI_HOVER)] = 3;
  890. m_arrIndicesButtonTS[INT(__E07BI_PRESSED)] = 2;
  891. m_arrIndicesButtonTS[INT(__E07BI_HDD)] = 3;
  892. m_arrIndicesButtonTS[INT(__E07BI_SEL_T)] = 1;
  893. m_arrIndicesButtonTS[INT(__E07BI_INDETERMINATE)] = 0;
  894. m_arrIndicesButtonSS_Left[INT(__E07BI_NORMAL)] = -1;
  895. m_arrIndicesButtonSS_Left[INT(__E07BI_HOVER)] = 0;
  896. m_arrIndicesButtonSS_Left[INT(__E07BI_PRESSED)] = 1;
  897. m_arrIndicesButtonSS_Left[INT(__E07BI_HDD)] = 2;
  898. m_arrIndicesButtonSS_Left[INT(__E07BI_SEL_T)] = 5;
  899. m_arrIndicesButtonSS_Left[INT(__E07BI_INDETERMINATE)] = 4;
  900. m_arrIndicesButtonSS_Right[INT(__E07BI_NORMAL)] = -1;
  901. m_arrIndicesButtonSS_Right[INT(__E07BI_HOVER)] = 0;
  902. m_arrIndicesButtonSS_Right[INT(__E07BI_PRESSED)] = 1;
  903. m_arrIndicesButtonSS_Right[INT(__E07BI_HDD)] = 2;
  904. m_arrIndicesButtonSS_Right[INT(__E07BI_SEL_T)] = 4;
  905. m_arrIndicesButtonSS_Right[INT(__E07BI_INDETERMINATE)] = 3;
  906. m_arrIndicesButtonLSM[INT(__E07BI_NORMAL)] = -1;
  907. m_arrIndicesButtonLSM[INT(__E07BI_HOVER)] = 0;
  908. m_arrIndicesButtonLSM[INT(__E07BI_PRESSED)] = 1;
  909. m_arrIndicesButtonLSM[INT(__E07BI_HDD)] = 2;
  910. m_arrIndicesButtonLSM[INT(__E07BI_SEL_T)] = 0;
  911. m_arrIndicesButtonLSM[INT(__E07BIX_INDETERMINATE)] = 0;
  912. // m_arrIndicesButtonLSB[INT(__E07BI_NORMAL)] = -1;
  913. // m_arrIndicesButtonLSB[INT(__E07BI_HOVER)] = 0;
  914. // m_arrIndicesButtonLSB[INT(__E07BI_PRESSED)] = 1;
  915. // m_arrIndicesButtonLSB[INT(__E07BI_HDD)] = 2;
  916. // m_arrIndicesButtonLSB[INT(__E07BI_SEL_T)] = 0;
  917. // m_arrIndicesButtonLSB[INT(__E07BI_INDETERMINATE)] = 0;
  918. m_arrIndicesButtonLSXM[INT(__E07BIX_NORMAL)] = -1;
  919. m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER)] = 0;
  920. m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER2)] = 5;
  921. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED)] = 1;
  922. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED2)] = 2;
  923. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED3)] = 3;
  924. m_arrIndicesButtonLSXM[INT(__E07BIX_INDETERMINATE)] = 4;
  925. m_arrIndicesButtonLSXM[INT(__E07BIX_SELECTED)] = 5;
  926. m_arrIndicesButtonLSXB[INT(__E07BIX_NORMAL)] = -1;
  927. m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER)] = 0;
  928. m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER2)] = 4;
  929. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED)] = 1;
  930. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED2)] = 2;
  931. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED3)] = 2;
  932. m_arrIndicesButtonLSXB[INT(__E07BIX_INDETERMINATE)] = 3;
  933. m_arrIndicesButtonLSXB[INT(__E07BIX_SELECTED)] = 4;
  934. VERIFY(
  935. m_bmpArrButtonTS[INT(__EBTSA_SOLID)].LoadBMP_Resource(
  936. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SOLID_R2_OBSIDIAN)
  937. )
  938. );
  939. m_bmpArrButtonTS[INT(__EBTSA_SOLID)].PreMultipliedRGBChannelsSet( true );
  940. VERIFY(
  941. m_bmpArrButtonTS[INT(__EBTSA_LEFT)].LoadBMP_Resource(
  942. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_LEFT_R2_OBSIDIAN)
  943. )
  944. );
  945. m_bmpArrButtonTS[INT(__EBTSA_LEFT)].PreMultipliedRGBChannelsSet( true );
  946. VERIFY(
  947. m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].LoadBMP_Resource(
  948. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_MIDDLE_R2_OBSIDIAN)
  949. )
  950. );
  951. m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].PreMultipliedRGBChannelsSet( true );
  952. VERIFY(
  953. m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].LoadBMP_Resource(
  954. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_RIGHT_R2_OBSIDIAN)
  955. )
  956. );
  957. m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
  958. VERIFY(
  959. m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].LoadBMP_Resource(
  960. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_LEFT_R2)
  961. )
  962. );
  963. m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].PreMultipliedRGBChannelsSet( true );
  964. VERIFY(
  965. m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].LoadBMP_Resource(
  966. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_RIGHT_R2)
  967. )
  968. );
  969. m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
  970. m_bmpArrButtonSS_simple = m_bmpArrButtonSS_DD[ INT(__EBSSA_LEFT) ];
  971. if( ! m_bmpArrButtonSS_simple.IsEmpty() )
  972. {
  973. CSize _sizeBmp = m_bmpArrButtonSS_simple.GetSize();
  974. INT nY = 0, nXRange = _sizeBmp.cx / 2;
  975. for( ; nY < _sizeBmp.cy; nY ++ )
  976. {
  977. INT nXSrc = nXRange - 1, nXDst = _sizeBmp.cx - nXRange;
  978. for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
  979. {
  980. RGBQUAD _pixel;
  981. VERIFY( m_bmpArrButtonSS_simple.GetPixel( nXSrc, nY, _pixel ) );
  982. VERIFY( m_bmpArrButtonSS_simple.SetPixel( nXDst, nY, _pixel ) );
  983. } // for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
  984. } // for( ; nY < _sizeBmp.cy; nY ++ )
  985. } // if( m_bmpArrButtonSS_simple.IsEmpty() )
  986. VERIFY(
  987. m_bmpArrButtonLSM.LoadBMP_Resource(
  988. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_ALL_R2) // IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2
  989. )
  990. );
  991. // m_bmpArrButtonLSM.PreMultipliedRGBChannelsSet( true );
  992. // VERIFY(
  993. // m_bmpArrButtonLSB.LoadBMP_Resource(
  994. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  995. // )
  996. // );
  997. // m_bmpArrButtonLSB.PreMultipliedRGBChannelsSet( true );
  998. VERIFY(
  999. m_bmpArrButtonLSXM.LoadBMP_Resource(
  1000. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2)
  1001. )
  1002. );
  1003. m_bmpArrButtonLSXM.PreMultipliedRGBChannelsSet( true );
  1004. VERIFY(
  1005. m_bmpArrButtonLSXB.LoadBMP_Resource(
  1006. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  1007. )
  1008. );
  1009. m_bmpArrButtonLSXB.PreMultipliedRGBChannelsSet( true );
  1010. VERIFY(
  1011. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].LoadBMP_Resource(
  1012. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_HOVER_R2)
  1013. )
  1014. );
  1015. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].Make32();
  1016. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1017. VERIFY(
  1018. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].LoadBMP_Resource(
  1019. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_PRESSED_R2)
  1020. )
  1021. );
  1022. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].Make32();
  1023. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1024. VERIFY(
  1025. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].LoadBMP_Resource(
  1026. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_HOVER_R2)
  1027. )
  1028. );
  1029. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].Make32();
  1030. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1031. VERIFY(
  1032. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].LoadBMP_Resource(
  1033. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_PRESSED_R2)
  1034. )
  1035. );
  1036. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].Make32();
  1037. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1038. VERIFY( m_bmpRibbonMenuResizingMarginHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_HV_OBSIDIAN) ) );
  1039. VERIFY( m_bmpRibbonMenuResizingMarginV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_V_OBSIDIAN) ) );
  1040. VERIFY( m_bmpRibbonMenuResizingGripperHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_HV_OBSIDIAN) ) );
  1041. m_bmpRibbonMenuResizingGripperHV.Make32();
  1042. m_bmpRibbonMenuResizingGripperHV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1043. VERIFY( m_bmpRibbonMenuResizingGripperV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_V_OBSIDIAN) ) );
  1044. m_bmpRibbonMenuResizingGripperV.Make32();
  1045. m_bmpRibbonMenuResizingGripperV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1046. m_clrRibbonModeMenuTextNormal = RGB(0,0,0);
  1047. VERIFY(
  1048. m_bmpRibbonModeMenuBorder.LoadBMP_Resource(
  1049. MAKEINTRESOURCE(IDB_EXT_2007_MENU_BORDER_R2)
  1050. )
  1051. );
  1052. m_bmpRibbonModeMenuBorder.Make32();
  1053. m_bmpRibbonModeMenuBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1054. m_clrMenuCaptionText = RGB(20,20,90);
  1055. m_rcMenuCaptionBmpPadding.SetRect( 0, 2, 0, 2 );
  1056. VERIFY(
  1057. m_bmpMenuCaptionBk.LoadBMP_Resource(
  1058. MAKEINTRESOURCE(IDB_EXT_2007_MENU_CAPTION_BK_R2_OBSIDIAN)
  1059. )
  1060. );
  1061. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 12, 6, 29 );
  1062. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R2_SILVER) ) );
  1063. m_bmpRibbonFileMenuBigBorder.Make32();
  1064. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1065. m_rcPaddingRibbonFileMenuOptionsButton.SetRect( 2, 2, 2, 2 );
  1066. VERIFY(
  1067. m_bmpRibbonFileMenuOptionsButtonCold.LoadBMP_Resource(
  1068. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_COLD_R2_OBSIDIAN)
  1069. )
  1070. );
  1071. m_bmpRibbonFileMenuOptionsButtonCold.Make32();
  1072. m_bmpRibbonFileMenuOptionsButtonCold.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1073. VERIFY(
  1074. m_bmpRibbonFileMenuOptionsButtonHot.LoadBMP_Resource(
  1075. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_HOT_R2)
  1076. )
  1077. );
  1078. m_bmpRibbonFileMenuOptionsButtonHot.Make32();
  1079. m_bmpRibbonFileMenuOptionsButtonHot.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1080. VERIFY( m_bmpResizingGripper.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RESIZING_GRIPPER_R2_OBSIDIAN) ) );
  1081. m_bmpResizingGripper.PreMultipliedRGBChannelsSet( true );
  1082. // spin bitmaps
  1083. VERIFY( m_arrBmpSpinArrowDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_DOWN_SILVER) ) );
  1084. VERIFY( m_arrBmpSpinArrowUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_UP_SILVER) ) );
  1085. VERIFY( m_arrBmpSpinDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_DOWN_SILVER) ) );
  1086. VERIFY( m_arrBmpSpinUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_UP_SILVER) ) );
  1087. #if (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  1088. m_bShortcutListUseDockerBkgnd = true;
  1089. #endif // (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  1090. }
  1091. CExtPaintManagerOffice2007_R3_Silver::CExtPaintManagerOffice2007_R3_Silver()
  1092. {
  1093. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  1094. m_nQatbAdditionalSpaceAtRightDWM = 0;
  1095. //  INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
  1096. //  INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
  1097. //  CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
  1098. m_rcRibbonNcCornerLeftCP.SetRect( 53, 2, 2, 2 );
  1099. m_rcRibbonNcCornerRightCP.SetRect( 2, 2, 42, 2 );
  1100. VERIFY(
  1101. m_bmpRibbonNcCornerDwmLeft.LoadBMP_Resource(
  1102. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_LEFT_R3_SILVER)
  1103. )
  1104. );
  1105. //m_bmpRibbonNcCornerDwmLeft.PreMultipliedRGBChannelsSet( true );
  1106. VERIFY(
  1107. m_bmpRibbonNcCornerDwmRight.LoadBMP_Resource(
  1108. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_RIGHT_R3_SILVER)
  1109. )
  1110. );
  1111. //m_bmpRibbonNcCornerDwmRight.PreMultipliedRGBChannelsSet( true );
  1112. m_bmpRibbonNcCornerDwmLeft.AdjustAlpha( -0.60 );
  1113. m_bmpRibbonNcCornerDwmRight.AdjustAlpha( -0.60 );
  1114. VERIFY(
  1115. m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
  1116. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R3_SILVER)
  1117. )
  1118. );
  1119. //  m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
  1120. //  m_bmpRibbonNcCornerActiveLeft.Scale(
  1121. //  m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
  1122. //  nCaptionHeightActive,
  1123. //  _fBox
  1124. //  );
  1125. VERIFY( m_bmpRibbonNcCornerActiveLeft.Make32() );
  1126. m_bmpRibbonNcCornerActiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1127. VERIFY(
  1128. m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
  1129. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R3_SILVER)
  1130. )
  1131. );
  1132. //  m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
  1133. //  m_bmpRibbonNcCornerInactiveLeft.Scale(
  1134. //  m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
  1135. //  nCaptionHeightInactive,
  1136. //  _fBox
  1137. //  );
  1138. VERIFY( m_bmpRibbonNcCornerInactiveLeft.Make32() );
  1139. m_bmpRibbonNcCornerInactiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1140. VERIFY(
  1141. m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
  1142. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R3_SILVER)
  1143. )
  1144. );
  1145. //  m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
  1146. //  m_bmpRibbonNcCornerActiveRight.Scale(
  1147. //  m_bmpRibbonNcCornerActiveRight.GetSize().cx,
  1148. //  nCaptionHeightActive,
  1149. //  _fBox
  1150. //  );
  1151. VERIFY( m_bmpRibbonNcCornerActiveRight.Make32() );
  1152. m_bmpRibbonNcCornerActiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1153. VERIFY(
  1154. m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
  1155. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R3_SILVER)
  1156. )
  1157. );
  1158. //  m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
  1159. //  m_bmpRibbonNcCornerInactiveRight.Scale(
  1160. //  m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
  1161. //  nCaptionHeightInactive,
  1162. //  _fBox
  1163. //  );
  1164. VERIFY( m_bmpRibbonNcCornerInactiveRight.Make32() );
  1165. m_bmpRibbonNcCornerInactiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1166. //  VERIFY(
  1167. //  m_bmpRibbonNcCornerHT.LoadBMP_Resource(
  1168. //  MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_SILVER)
  1169. //  )
  1170. //  );
  1171. //  m_bmpRibbonNcCornerHT.Make32();
  1172. //  m_bmpRibbonNcCornerHT.Scale(
  1173. //  m_bmpRibbonNcCornerHT.GetSize().cx,
  1174. //  nCaptionHeightActive,
  1175. //  _fBox
  1176. //  );
  1177. m_bmpRibbonNcCornerHT.Empty();
  1178. VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_R3_SILVER) ) );
  1179. //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
  1180. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 18, 6, 29 );
  1181. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R3_SILVER) ) );
  1182. m_bmpRibbonFileMenuBigBorder.Make32();
  1183. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1184. m_sizeAboveTheRibbonShiftQACEB.cx = 10;
  1185. m_sizeAboveTheRibbonShiftQACEB.cy = 0;
  1186. m_nRibbonFileButtonMenuIntersectionHeight = 20;
  1187. #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
  1188. }
  1189. CExtPaintManagerOffice2007_R3_LunaBlue::CExtPaintManagerOffice2007_R3_LunaBlue()
  1190. {
  1191. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  1192. m_nQatbAdditionalSpaceAtRightDWM = 0;
  1193. //  INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
  1194. //  INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
  1195. //  CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
  1196. m_rcRibbonNcCornerLeftCP.SetRect( 53, 2, 2, 2 );
  1197. m_rcRibbonNcCornerRightCP.SetRect( 2, 2, 42, 2 );
  1198. VERIFY(
  1199. m_bmpRibbonNcCornerDwmLeft.LoadBMP_Resource(
  1200. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_LEFT_R3_LUNA_BLUE)
  1201. )
  1202. );
  1203. //m_bmpRibbonNcCornerDwmLeft.PreMultipliedRGBChannelsSet( true );
  1204. VERIFY(
  1205. m_bmpRibbonNcCornerDwmRight.LoadBMP_Resource(
  1206. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_RIGHT_R3_LUNA_BLUE)
  1207. )
  1208. );
  1209. //m_bmpRibbonNcCornerDwmRight.PreMultipliedRGBChannelsSet( true );
  1210. m_bmpRibbonNcCornerDwmLeft.AdjustAlpha( -0.60 );
  1211. m_bmpRibbonNcCornerDwmRight.AdjustAlpha( -0.60 );
  1212. VERIFY(
  1213. m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
  1214. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R3_LUNA_BLUE)
  1215. )
  1216. );
  1217. //  m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
  1218. //  m_bmpRibbonNcCornerActiveLeft.Scale(
  1219. //  m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
  1220. //  nCaptionHeightActive,
  1221. //  _fBox
  1222. //  );
  1223. VERIFY( m_bmpRibbonNcCornerActiveLeft.Make32() );
  1224. m_bmpRibbonNcCornerActiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1225. VERIFY(
  1226. m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
  1227. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R3_LUNA_BLUE)
  1228. )
  1229. );
  1230. //  m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
  1231. //  m_bmpRibbonNcCornerInactiveLeft.Scale(
  1232. //  m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
  1233. //  nCaptionHeightInactive,
  1234. //  _fBox
  1235. //  );
  1236. VERIFY( m_bmpRibbonNcCornerInactiveLeft.Make32() );
  1237. m_bmpRibbonNcCornerInactiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1238. VERIFY(
  1239. m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
  1240. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R3_LUNA_BLUE)
  1241. )
  1242. );
  1243. //  m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
  1244. //  m_bmpRibbonNcCornerActiveRight.Scale(
  1245. //  m_bmpRibbonNcCornerActiveRight.GetSize().cx,
  1246. //  nCaptionHeightActive,
  1247. //  _fBox
  1248. //  );
  1249. VERIFY( m_bmpRibbonNcCornerActiveRight.Make32() );
  1250. m_bmpRibbonNcCornerActiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1251. VERIFY(
  1252. m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
  1253. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R3_LUNA_BLUE)
  1254. )
  1255. );
  1256. //  m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
  1257. //  m_bmpRibbonNcCornerInactiveRight.Scale(
  1258. //  m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
  1259. //  nCaptionHeightInactive,
  1260. //  _fBox
  1261. //  );
  1262. VERIFY( m_bmpRibbonNcCornerInactiveRight.Make32() );
  1263. m_bmpRibbonNcCornerInactiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1264. //  VERIFY(
  1265. //  m_bmpRibbonNcCornerHT.LoadBMP_Resource(
  1266. //  MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_LUNA_BLUE)
  1267. //  )
  1268. //  );
  1269. //  m_bmpRibbonNcCornerHT.Make32();
  1270. //  m_bmpRibbonNcCornerHT.Scale(
  1271. //  m_bmpRibbonNcCornerHT.GetSize().cx,
  1272. //  nCaptionHeightActive,
  1273. //  _fBox
  1274. //  );
  1275. m_bmpRibbonNcCornerHT.Empty();
  1276. VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_R3_LUNA_BLUE) ) );
  1277. //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
  1278. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 18, 6, 29 );
  1279. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R3_LUNA_BLUE) ) );
  1280. m_bmpRibbonFileMenuBigBorder.Make32();
  1281. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1282. m_sizeAboveTheRibbonShiftQACEB.cx = 10;
  1283. m_sizeAboveTheRibbonShiftQACEB.cy = 0;
  1284. m_nRibbonFileButtonMenuIntersectionHeight = 20;
  1285. #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
  1286. }
  1287. CExtPaintManagerOffice2007_R2_LunaBlue::~CExtPaintManagerOffice2007_R2_LunaBlue()
  1288. {
  1289. }
  1290. CExtPaintManagerOffice2007_R2_Silver::~CExtPaintManagerOffice2007_R2_Silver()
  1291. {
  1292. }
  1293. CExtPaintManagerOffice2007_R3_Silver::~CExtPaintManagerOffice2007_R3_Silver()
  1294. {
  1295. }
  1296. CExtPaintManagerOffice2007_R3_LunaBlue::~CExtPaintManagerOffice2007_R3_LunaBlue()
  1297. {
  1298. }
  1299. CExtPaintManagerOffice2007_R2_Obsidian::CExtPaintManagerOffice2007_R2_Obsidian()
  1300. {
  1301. m_clrFillHint = RGB(173,174,189);
  1302. m_clrAccentHint = RGB(255,227,140);
  1303. //m_clrIconAlphaColor = RGB(128,128,128); // not needed
  1304. m_clrForceSplitterBk = RGB(83,83,83);
  1305. m_clrDCA1 = RGB(72,72,72);
  1306. m_clrDCA2 = RGB(45,45,45);
  1307. m_clrDCA3 = RGB(10,10,10);
  1308. m_bDocumentClientAreaBkgndR2 = true;
  1309. VERIFY( m_bmpDCA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_DCA_OBSIDIAN) ) );
  1310. m_clrCustomDropDownGlyphEnabled = RGB(0,0,0);
  1311. m_clrCustomDropDownGlyphDisabled = RGB(141,141,141);
  1312. m_clrDockingFrameDark = RGB(49,60,66);
  1313. m_clrFloatingToolbarGripperSolid = RGB(74,81,90);
  1314. m_clrDockingFrameCaptionTextActive = RGB(0,0,0);
  1315. m_clrDockingFrameCaptionTextInactive =  RGB(0,0,0);
  1316. m_clrDockingFrameCaptionTextFloatingFixed =  RGB(255,255,255);
  1317. m_clrDockingCaptionShapeFixedNormal =  RGB(255,255,255);
  1318. m_rcNcFrameBordersActive.SetRect( 3, 4, 3, 2 );
  1319. m_rcNcFrameBordersInactive.SetRect( 3, 4, 3, 2 );
  1320. m_nCaptionHeightActive = m_nCaptionHeightInactive = 26;
  1321. VERIFY( m_bmpNcFrameActive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_ACTIVE_OBSIDIAN) ) );
  1322. VERIFY( m_bmpNcFrameInactive.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_FRAME_INACTIVE_OBSIDIAN) ) );
  1323. VERIFY( m_bmpNcFrameActive.Make32() );
  1324. VERIFY( m_bmpNcFrameInactive.Make32() );
  1325. m_bmpNcFrameActive.AlphaColor( m_clrTransparentNcFrameActive, RGB(0,0,0), 0 );
  1326. m_bmpNcFrameInactive.AlphaColor( m_clrTransparentNcFrameInactive, RGB(0,0,0), 0 );
  1327. m_clrNcFrameTextActive = RGB(255,255,255); // = RGB(174,209,255);
  1328. m_clrNcFrameTextInactive = RGB(183,183,183); // = RGB(255,255,255); // = RGB(174,209,255);
  1329. VERIFY( m_bmpNcButtonBkHover.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_HOVER_OBSIDIAN) ) );
  1330. VERIFY( m_bmpNcButtonBkPressed.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_BUTTON_BK_PRESSED_OBSIDIAN) ) );
  1331. VERIFY( m_bmpArrNcButtonsHelp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_HELP_OBSIDIAN) ) );
  1332. VERIFY( m_bmpArrNcButtonsClose.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_CLOSE_OBSIDIAN) ) );
  1333. VERIFY( m_bmpArrNcButtonsMaximize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MAXIMIZE_OBSIDIAN) ) );
  1334. VERIFY( m_bmpArrNcButtonsRestore.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_RESTORE_OBSIDIAN) ) );
  1335. VERIFY( m_bmpArrNcButtonsMinimize.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_NC_ARR_MINIMIZE_OBSIDIAN) ) );
  1336. #if (!defined __EXT_MFC_NO_STATUSBAR)
  1337. m_rcStatusBkPadding.SetRect( 0, 2, 0, 1 );
  1338. VERIFY( m_bmpStatusBkLight.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_LIGHT_OBSIDIAN) ) );
  1339. VERIFY( m_bmpStatusBkDark.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_BK_DARK_OBSIDIAN) ) );
  1340. m_rcStatusSeparatorPadding.SetRect( 0, 2, 0, 1 );
  1341. VERIFY( m_bmpStatusSeparator.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_STATUSBAR_SEPARATOR_OBSIDIAN) ) );
  1342. //  VERIFY( m_bmpStatusSeparator.Make32() );
  1343. //  m_bmpStatusSeparator.AdjustAlpha( -0.5 );
  1344. //m_clrStatusPaneTextColorDisabled = RGB(128,128,128);
  1345. m_clrStatusPaneTextColorNormal = RGB(255,255,255);
  1346. #endif // (!defined __EXT_MFC_NO_STATUSBAR)
  1347. #if (!defined __EXT_MFC_NO_TAB_CTRL)
  1348. m_clrTabTextNormal = RGB(255,255,255);
  1349. m_clrTabTextSelected = RGB(0,0,0);
  1350. m_nIdxTabShapeHover = 1;
  1351. m_nIdxTabShapePressed = 2;
  1352. m_nIdxTabShapeSelected = 3;
  1353. m_nIdxTabShapeSelectedHover = 4;
  1354. m_arrSizeTabShape[__ETSOI_TOP].cx
  1355. = m_arrSizeTabShape[__ETSOI_BOTTOM].cx
  1356. = m_arrSizeTabShape[__ETSOI_LEFT].cy
  1357. = m_arrSizeTabShape[__ETSOI_RIGHT].cy
  1358. = 57;
  1359. m_arrSizeTabShape[__ETSOI_TOP].cy
  1360. = m_arrSizeTabShape[__ETSOI_BOTTOM].cy
  1361. = m_arrSizeTabShape[__ETSOI_LEFT].cx
  1362. = m_arrSizeTabShape[__ETSOI_RIGHT].cx
  1363. = 24;
  1364. m_arrRectTabShapePadding[__ETSOI_TOP].SetRect( 6, 3, 6, 3 );
  1365. m_arrRectTabShapePadding[__ETSOI_BOTTOM].SetRect( 6, 3, 6, 3 );
  1366. m_arrRectTabShapePadding[__ETSOI_LEFT].SetRect( 3, 6, 3, 6 );
  1367. m_arrRectTabShapePadding[__ETSOI_RIGHT].SetRect( 3, 6, 3, 6 );
  1368. VERIFY(
  1369. m_arrBmpTabShapeNormal[__ETSOI_TOP].LoadBMP_Resource(
  1370. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SHAPE_ARR_OBSIDIAN )
  1371. )
  1372. );
  1373. VERIFY( m_arrBmpTabShapeNormal[__ETSOI_TOP].Make32() );
  1374. m_arrBmpTabShapeNormal[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  1375. VERIFY(
  1376. m_arrBmpTabShapeNormal[__ETSOI_BOTTOM].CreateRotated9xStack(
  1377. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  1378. 180,
  1379. 5,
  1380. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1381. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1382. false,
  1383. false
  1384. )
  1385. );
  1386. VERIFY(
  1387. m_arrBmpTabShapeNormal[__ETSOI_LEFT].CreateRotated9xStack(
  1388. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  1389. 270,
  1390. 5,
  1391. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1392. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1393. false,
  1394. false
  1395. )
  1396. );
  1397. VERIFY(
  1398. m_arrBmpTabShapeNormal[__ETSOI_RIGHT].CreateRotated9xStack(
  1399. m_arrBmpTabShapeNormal[__ETSOI_TOP],
  1400. 90,
  1401. 5,
  1402. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1403. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1404. false,
  1405. false
  1406. )
  1407. );
  1408. VERIFY(
  1409. m_arrBmpTabShapeSelArea[__ETSOI_TOP].LoadBMP_Resource(
  1410. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SHAPE_ARR_OBSIDIAN_SEL_AREA )
  1411. )
  1412. );
  1413. VERIFY( m_arrBmpTabShapeSelArea[__ETSOI_TOP].Make32() );
  1414. m_arrBmpTabShapeSelArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  1415. VERIFY(
  1416. m_arrBmpTabShapeSelArea[__ETSOI_BOTTOM].CreateRotated9xStack(
  1417. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  1418. 180,
  1419. 5,
  1420. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1421. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1422. false,
  1423. false
  1424. )
  1425. );
  1426. VERIFY(
  1427. m_arrBmpTabShapeSelArea[__ETSOI_LEFT].CreateRotated9xStack(
  1428. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  1429. 270,
  1430. 5,
  1431. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1432. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1433. false,
  1434. false
  1435. )
  1436. );
  1437. VERIFY(
  1438. m_arrBmpTabShapeSelArea[__ETSOI_RIGHT].CreateRotated9xStack(
  1439. m_arrBmpTabShapeSelArea[__ETSOI_TOP],
  1440. 90,
  1441. 5,
  1442. m_arrSizeTabShape[__ETSOI_TOP].cx,
  1443. m_arrSizeTabShape[__ETSOI_TOP].cy,
  1444. false,
  1445. false
  1446. )
  1447. );
  1448. m_arrRectTabAreaPadding[__ETSOI_TOP].SetRect( 4, 4, 4, 4 );
  1449. m_arrRectTabAreaPadding[__ETSOI_BOTTOM].SetRect( 4, 4, 4, 4 );
  1450. m_arrRectTabAreaPadding[__ETSOI_LEFT].SetRect( 4, 4, 4, 4 );
  1451. m_arrRectTabAreaPadding[__ETSOI_RIGHT].SetRect( 4, 4, 4, 4 );
  1452. m_arrTabAreaMargins[__ETSOI_TOP] = 1;
  1453. m_arrTabAreaMargins[__ETSOI_BOTTOM] = 1;
  1454. m_arrTabAreaMargins[__ETSOI_LEFT] = 1;
  1455. m_arrTabAreaMargins[__ETSOI_RIGHT] = 1;
  1456. VERIFY(
  1457. m_arrBmpTabArea[__ETSOI_TOP].LoadBMP_Resource(
  1458. MAKEINTRESOURCE( IDB_EXT_2007_TAB_AREA_BK_OBSIDIAN )
  1459. )
  1460. );
  1461. VERIFY( m_arrBmpTabArea[__ETSOI_TOP].Make32() );
  1462. CSize _sizeTabArea = m_arrBmpTabArea[__ETSOI_TOP].GetSize();
  1463. m_arrBmpTabArea[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  1464. VERIFY(
  1465. m_arrBmpTabArea[__ETSOI_BOTTOM].CreateRotated9xStack(
  1466. m_arrBmpTabArea[__ETSOI_TOP],
  1467. 180,
  1468. 1,
  1469. _sizeTabArea.cx,
  1470. _sizeTabArea.cy,
  1471. false,
  1472. false
  1473. )
  1474. );
  1475. VERIFY(
  1476. m_arrBmpTabArea[__ETSOI_LEFT].CreateRotated9xStack(
  1477. m_arrBmpTabArea[__ETSOI_TOP],
  1478. 270,
  1479. 1,
  1480. _sizeTabArea.cx,
  1481. _sizeTabArea.cy,
  1482. false,
  1483. false
  1484. )
  1485. );
  1486. VERIFY(
  1487. m_arrBmpTabArea[__ETSOI_RIGHT].CreateRotated9xStack(
  1488. m_arrBmpTabArea[__ETSOI_TOP],
  1489. 90,
  1490. 1,
  1491. _sizeTabArea.cx,
  1492. _sizeTabArea.cy,
  1493. false,
  1494. false
  1495. )
  1496. );
  1497. m_arrSizeTabSeparator[__ETSOI_TOP].cx
  1498. = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cx
  1499. = m_arrSizeTabSeparator[__ETSOI_LEFT].cy
  1500. = m_arrSizeTabSeparator[__ETSOI_RIGHT].cy
  1501. = 1;
  1502. m_arrSizeTabSeparator[__ETSOI_TOP].cy
  1503. = m_arrSizeTabSeparator[__ETSOI_BOTTOM].cy
  1504. = m_arrSizeTabSeparator[__ETSOI_LEFT].cx
  1505. = m_arrSizeTabSeparator[__ETSOI_RIGHT].cx
  1506. = 24;
  1507. m_arrRectTabSeparatorPadding[__ETSOI_TOP].SetRect( 0, 2, 0, 2 );
  1508. m_arrRectTabSeparatorPadding[__ETSOI_BOTTOM].SetRect( 0, 2, 0, 2 );
  1509. m_arrRectTabSeparatorPadding[__ETSOI_LEFT].SetRect( 2, 0, 2, 0 );
  1510. m_arrRectTabSeparatorPadding[__ETSOI_RIGHT].SetRect( 2, 0, 2, 0 );
  1511. VERIFY(
  1512. m_arrBmpTabSeparator[__ETSOI_TOP].LoadBMP_Resource(
  1513. MAKEINTRESOURCE( IDB_EXT_2007_TAB_SEPARATOR_OBSIDIAN )
  1514. )
  1515. );
  1516. VERIFY( m_arrBmpTabSeparator[__ETSOI_TOP].Make32() );
  1517. m_arrBmpTabSeparator[__ETSOI_TOP].PreMultiplyRGBChannels();
  1518. m_arrBmpTabSeparator[__ETSOI_TOP].PreMultipliedRGBChannelsSet( true );
  1519. VERIFY(
  1520. m_arrBmpTabSeparator[__ETSOI_BOTTOM].CreateRotated9xStack(
  1521. m_arrBmpTabSeparator[__ETSOI_TOP],
  1522. 180,
  1523. 1,
  1524. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  1525. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  1526. false,
  1527. false
  1528. )
  1529. );
  1530. VERIFY(
  1531. m_arrBmpTabSeparator[__ETSOI_LEFT].CreateRotated9xStack(
  1532. m_arrBmpTabSeparator[__ETSOI_TOP],
  1533. 270,
  1534. 1,
  1535. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  1536. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  1537. false,
  1538. false
  1539. )
  1540. );
  1541. VERIFY(
  1542. m_arrBmpTabSeparator[__ETSOI_RIGHT].CreateRotated9xStack(
  1543. m_arrBmpTabSeparator[__ETSOI_TOP],
  1544. 90,
  1545. 1,
  1546. m_arrSizeTabSeparator[__ETSOI_TOP].cx,
  1547. m_arrSizeTabSeparator[__ETSOI_TOP].cy,
  1548. false,
  1549. false
  1550. )
  1551. );
  1552. #endif // (!defined __EXT_MFC_NO_TAB_CTRL)
  1553. VERIFY(
  1554. m_bmpArrStatesCheckBox.LoadBMP_Resource(
  1555. MAKEINTRESOURCE( IDB_EXT_2007_CHECK_BOX_R2_OBSIDIAN )
  1556. )
  1557. );
  1558. VERIFY(
  1559. m_bmpArrStatesRadioButton.LoadBMP_Resource(
  1560. MAKEINTRESOURCE( IDB_EXT_2007_RADIO_BUTTON_R2 )
  1561. )
  1562. );
  1563. m_clrMenuItemLeftAreaMarginL = RGB(197,197,197);
  1564. m_clrMenuItemLeftAreaMarginR = RGB(245,245,245);
  1565. VERIFY(
  1566. m_bmpMenuItemLargeLeft.LoadBMP_Resource(
  1567. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_LARGE_LEFT )
  1568. )
  1569. );
  1570. m_bmpMenuItemLargeLeft.PreMultipliedRGBChannelsSet( true );
  1571. VERIFY(
  1572. m_bmpMenuItemLargeRight.LoadBMP_Resource(
  1573. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_LARGE_RIGHT )
  1574. )
  1575. );
  1576. m_bmpMenuItemLargeRight.PreMultipliedRGBChannelsSet( true );
  1577. VERIFY(
  1578. m_bmpMenuItemSmallLeft.LoadBMP_Resource(
  1579. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_SMALL_LEFT )
  1580. )
  1581. );
  1582. m_bmpMenuItemSmallLeft.PreMultipliedRGBChannelsSet( true );
  1583. VERIFY(
  1584. m_bmpMenuItemSmallRight.LoadBMP_Resource(
  1585. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_R2_SMALL_RIGHT )
  1586. )
  1587. );
  1588. m_bmpMenuItemSmallRight.PreMultipliedRGBChannelsSet( true );
  1589. VERIFY(
  1590. m_bmpMenuArrow.LoadBMP_Resource(
  1591. MAKEINTRESOURCE( IDB_EXT_2007_MENU_ITEM_ARROW )
  1592. )
  1593. );
  1594. m_sizeMenuCheckAreaChecked.cx = 16;
  1595. m_sizeMenuCheckAreaChecked.cy = 16;
  1596. m_sizeMenuCheckAreaUnchecked.cx = 20;
  1597. m_sizeMenuCheckAreaUnchecked.cy = 20;
  1598. m_arrRectMenuCheckAreaCheckedPadding[0].SetRect( 1, 1, 1, 1 );
  1599. m_arrRectMenuCheckAreaCheckedPadding[1].SetRect( 1, 1, 1, 1 );
  1600. m_arrRectMenuCheckAreaUncheckedPadding[0].SetRect( 2, 2, 2, 2 );
  1601. m_arrRectMenuCheckAreaUncheckedPadding[1].SetRect( 2, 2, 2, 2 );
  1602. VERIFY( m_bmpMenuCheckAreaChecked.LoadBMP_Resource(   MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_CHECKED_R2   ) ) );
  1603. VERIFY( m_bmpMenuCheckAreaUnchecked.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_MENU_CHECK_AREA_UNCHECKED_R2 ) ) );
  1604. VERIFY( m_bmpArrComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_COMBO_BOX_BUTTON_R2_OBSIDIAN ) ) );
  1605. m_arrClrComboBoxBorder[0] = RGB(137,137,137);
  1606. m_arrClrComboBoxBorder[1] = RGB(137,137,137);
  1607. m_arrClrComboBoxBorder[2] = RGB(137,137,137);
  1608. m_arrClrComboBoxBorder[3] = RGB(137,137,137);
  1609. CRect SbSkinDataPaddingH( 5, 3, 5, 3 ), SbSkinDataPaddingV( 3, 5, 3, 5 );
  1610. CRect rcEntirePaddingRH( 0, 2, 0, 2 ), rcEntirePaddingRV( 2, 0, 2, 0 );
  1611. CRect rcEntirePaddingCH( 1, 1, 1, 1 ), rcEntirePaddingCV( 1, 1, 1, 1 );
  1612. m_SbSkinDataT_Zoom.Load2007_Zoom(
  1613. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  1614. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_TOP
  1615. );
  1616. m_SbSkinDataB_Zoom.Load2007_Zoom(
  1617. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  1618. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_BOTTOM
  1619. );
  1620. m_SbSkinDataL_Zoom.Load2007_Zoom(
  1621. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  1622. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_LEFT
  1623. );
  1624. m_SbSkinDataR_Zoom.Load2007_Zoom(
  1625. IDB_EXT_2007_ZS_PLUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_MINUS_R2_OBSIDIAN, IDB_EXT_2007_ZS_THUMB_R2_OBSIDIAN,
  1626. RGB(204,204,204), RGB(37,37,37), RGB(148,149,151), RGB(68,69,71), AFX_IDW_DOCKBAR_RIGHT
  1627. );
  1628. m_SbSkinDataH_Light.Load2007_R2(
  1629. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_HORZ_OBSIDIAN,
  1630. 15,
  1631. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_HORZ,
  1632. 8,
  1633. SbSkinDataPaddingH,
  1634. COLORREF(-1L), // RGB(64,64,64),
  1635. COLORREF(-1L), // RGB(91,98,115),
  1636. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  1637. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  1638. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  1639. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  1640. true,
  1641. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_LIGHT,
  1642. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_LIGHT,
  1643. rcEntirePaddingRH,
  1644. rcEntirePaddingCH
  1645. );
  1646. m_SbSkinDataV_Light.Load2007_R2(
  1647. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_VERT_OBSIDIAN,
  1648. 21,
  1649. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_VERT,
  1650. 8,
  1651. SbSkinDataPaddingV,
  1652. COLORREF(-1L), // RGB(64,64,64),
  1653. COLORREF(-1L), // RGB(91,98,115),
  1654. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  1655. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  1656. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  1657. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  1658. false,
  1659. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_LIGHT,
  1660. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_LIGHT,
  1661. rcEntirePaddingRV,
  1662. rcEntirePaddingCV
  1663. );
  1664. m_SbSkinDataH_Dark.Load2007_R2(
  1665. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_HORZ_OBSIDIAN,
  1666. 15,
  1667. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_HORZ,
  1668. 8,
  1669. SbSkinDataPaddingH,
  1670. COLORREF(-1L), // RGB(64,64,64),
  1671. COLORREF(-1L), // RGB(91,98,115),
  1672. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  1673. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  1674. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  1675. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  1676. true,
  1677. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_DARK,
  1678. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_DARK,
  1679. rcEntirePaddingRH,
  1680. rcEntirePaddingCH
  1681. );
  1682. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_HOT)][INT(__ESBMHT_GLYPH_ARROW_UP)] =
  1683. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)];
  1684. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_GLYPH_ARROW_UP)] =
  1685. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)];
  1686. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)].
  1687. AdjustHLS( COLORREF(-1L), RGB(0,0,0), 0.0, 0.75, -1.0 );
  1688. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_HOT)][INT(__ESBMHT_GLYPH_ARROW_DOWN)] =
  1689. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)];
  1690. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_GLYPH_ARROW_DOWN)] =
  1691. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)];
  1692. m_SbSkinDataH_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)].
  1693. AdjustHLS( COLORREF(-1L), RGB(0,0,0), 0.0, 0.75, -1.0 );
  1694. m_SbSkinDataV_Dark.Load2007_R2(
  1695. IDB_EXT_2007_SCROLL_BAR_STACK_BUTTONS_R2_VERT_OBSIDIAN,
  1696. 21,
  1697. IDB_EXT_2007_SCROLL_BAR_STACK_GRIPPER_R2_VERT,
  1698. 8,
  1699. SbSkinDataPaddingV,
  1700. COLORREF(-1L), // RGB(64,64,64),
  1701. COLORREF(-1L), // RGB(91,98,115),
  1702. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_NORMAL_R2,
  1703. IDB_EXT_2007_SCROLL_BAR_ARROW_UP_DISABLED_R2,
  1704. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_NORMAL_R2,
  1705. IDB_EXT_2007_SCROLL_BAR_ARROW_DOWN_DISABLED_R2,
  1706. false,
  1707. IDB_EXT_2007_SCROLL_BAR_ENTIRE_BK_R2_OBSIDIAN_DARK,
  1708. IDB_EXT_2007_SCROLL_BAR_PAGE_BK_R2_OBSIDIAN_DARK,
  1709. rcEntirePaddingRV,
  1710. rcEntirePaddingCV
  1711. );
  1712. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_HOT)][INT(__ESBMHT_GLYPH_ARROW_UP)] =
  1713. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)];
  1714. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_GLYPH_ARROW_UP)] =
  1715. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)];
  1716. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_UP)].
  1717. AdjustHLS( COLORREF(-1L), RGB(0,0,0), 0.0, 0.75, -1.0 );
  1718. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_HOT)][INT(__ESBMHT_GLYPH_ARROW_DOWN)] =
  1719. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)];
  1720. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_NORMAL)][INT(__ESBMHT_GLYPH_ARROW_DOWN)] =
  1721. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)];
  1722. m_SbSkinDataV_Dark.m_arrPartBmp[INT(__ESBSPT_COLD)][INT(__ESBMHT_GLYPH_ARROW_DOWN)].
  1723. AdjustHLS( COLORREF(-1L), RGB(0,0,0), 0.0, 0.75, -1.0 );
  1724. m_clrGridHeaderBkTop     = RGB(253,253,253);
  1725. m_clrGridHeaderBkBottom  = RGB(212,215,220);
  1726. m_clrGridHeaderSeparator = RGB(145,153,164);
  1727. m_clrGridHeaderSortArrow = RGB(145,153,164);
  1728. m_clrGridHeaderBorder    = RGB(145,153,164);
  1729. m_clrRgHeaderBkTop     = RGB(253,253,253);
  1730. m_clrRgHeaderBkBottom  = RGB(212,215,220);
  1731. m_clrRgHeaderSeparator = RGB(145,153,164);
  1732. m_clrRgHeaderSortArrow = RGB(145,153,164);
  1733. m_clrRgHeaderText      = RGB(0,0,0);
  1734. m_clrRgHeaderBorder    = RGB(76,83,92);
  1735. #if (!defined __EXT_MFC_NO_REPORTGRIDWND)
  1736. m_clrRgGroupAreaBk     = RGB(235,235,235);
  1737. m_clrRgGroupAreaText   = RGB(70,70,70);
  1738. #endif // (!defined __EXT_MFC_NO_REPORTGRIDWND)
  1739. //   m_nTbbLightWeightSimpleGlyphHeightV = 20;
  1740. //   m_nTbbLightWeightSDDLeftGlyphHeightV = 23;
  1741. //  m_nTbbLightWeightSDDRightGlyphHeightV = 10;
  1742. //  VERIFY(
  1743. //  m_arrBmpTbbLightWeightSimpleH.LoadBMP_Resource(
  1744. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_SIMPLE )
  1745. //  )
  1746. //  );
  1747. //  VERIFY(
  1748. //  m_arrBmpTbbLightWeightSDDLeftH.LoadBMP_Resource(
  1749. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_LEFT_PART )
  1750. //  )
  1751. //  );
  1752. //  VERIFY(
  1753. //  m_arrBmpTbbLightWeightSDDRightH.LoadBMP_Resource(
  1754. //  MAKEINTRESOURCE(IDB_EXT_2007_TBB_LIGHTWEIGHT_R2_RIGHT_PART )
  1755. //  )
  1756. //  );
  1757. //  //  m_arrBmpTbbLightWeightSimpleH.PreMultipliedRGBChannelsSet( true );
  1758. //  //  m_arrBmpTbbLightWeightSDDLeftH.PreMultipliedRGBChannelsSet( true );
  1759. //  //  m_arrBmpTbbLightWeightSDDRightH.PreMultipliedRGBChannelsSet( true );
  1760. //  VERIFY(
  1761. //  m_arrBmpTbbLightWeightSimpleV.CreateRotated9xStack(
  1762. //  m_arrBmpTbbLightWeightSimpleH,
  1763. //  90,
  1764. //  INT(__EPBGT_GLYPH_COUNT),
  1765. //  m_arrBmpTbbLightWeightSimpleH.GetSize().cx,
  1766. //  m_nTbbLightWeightSimpleGlyphHeightH,
  1767. //  false,
  1768. //  false
  1769. //  )
  1770. //  );
  1771. //  VERIFY(
  1772. //  m_arrBmpTbbLightWeightSDDLeftV.CreateRotated9xStack(
  1773. //  m_arrBmpTbbLightWeightSDDLeftH,
  1774. //  90,
  1775. //  INT(__EPBGT_GLYPH_COUNT),
  1776. //  m_arrBmpTbbLightWeightSDDLeftH.GetSize().cx,
  1777. //  m_nTbbLightWeightSDDLeftGlyphHeightH,
  1778. //  false,
  1779. //  false
  1780. //  )
  1781. //  );
  1782. //  VERIFY(
  1783. //  m_arrBmpTbbLightWeightSDDRightV.CreateRotated9xStack(
  1784. //  m_arrBmpTbbLightWeightSDDRightH,
  1785. //  90,
  1786. //  INT(__EPBGT_GLYPH_COUNT),
  1787. //  m_arrBmpTbbLightWeightSDDRightH.GetSize().cx,
  1788. //  m_nTbbLightWeightSDDRightGlyphHeightH,
  1789. //  false,
  1790. //  false
  1791. //  )
  1792. //  );
  1793.   m_nPushBtnSimpleGlyphHeightV = 20;
  1794.   m_nPushBtnSDDLeftGlyphHeightV = 23;
  1795. m_nPushBtnSDDRightGlyphHeightV = 10;
  1796. VERIFY(
  1797. m_arrBmpPushBtnSimpleH.LoadBMP_Resource(
  1798. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_SIMPLE )
  1799. )
  1800. );
  1801. VERIFY(
  1802. m_arrBmpPushBtnSDDLeftH.LoadBMP_Resource(
  1803. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_LEFT_PART )
  1804. )
  1805. );
  1806. VERIFY(
  1807. m_arrBmpPushBtnSDDRightH.LoadBMP_Resource(
  1808. MAKEINTRESOURCE(IDB_EXT_2007_BUTTON_R2_OBSIDIAN_RIGHT_PART )
  1809. )
  1810. );
  1811. //  m_arrBmpPushBtnSimpleH.PreMultipliedRGBChannelsSet( true );
  1812. //  m_arrBmpPushBtnSDDLeftH.PreMultipliedRGBChannelsSet( true );
  1813. //  m_arrBmpPushBtnSDDRightH.PreMultipliedRGBChannelsSet( true );
  1814. VERIFY(
  1815. m_arrBmpPushBtnSimpleV.CreateRotated9xStack(
  1816. m_arrBmpPushBtnSimpleH,
  1817. 90,
  1818. INT(__EPBGT_GLYPH_COUNT),
  1819. m_arrBmpPushBtnSimpleH.GetSize().cx,
  1820. m_nPushBtnSimpleGlyphHeightH,
  1821. false,
  1822. false
  1823. )
  1824. );
  1825. VERIFY(
  1826. m_arrBmpPushBtnSDDLeftV.CreateRotated9xStack(
  1827. m_arrBmpPushBtnSDDLeftH,
  1828. 90,
  1829. INT(__EPBGT_GLYPH_COUNT),
  1830. m_arrBmpPushBtnSDDLeftH.GetSize().cx,
  1831. m_nPushBtnSDDLeftGlyphHeightH,
  1832. false,
  1833. false
  1834. )
  1835. );
  1836. VERIFY(
  1837. m_arrBmpPushBtnSDDRightV.CreateRotated9xStack(
  1838. m_arrBmpPushBtnSDDRightH,
  1839. 90,
  1840. INT(__EPBGT_GLYPH_COUNT),
  1841. m_arrBmpPushBtnSDDRightH.GetSize().cx,
  1842. m_nPushBtnSDDRightGlyphHeightH,
  1843. false,
  1844. false
  1845. )
  1846. );
  1847. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  1848. m_nQatbAdditionalSpaceAtRightDWM = 30;
  1849. m_clrContractedMargin1 = RGB(98,98,98);
  1850. m_clrContractedMargin2 = RGB(79,79,79);
  1851. m_nContractedMarginHeight = 2;
  1852. m_bRibbonGroupCaptionAtTop = false;
  1853. m_bRibbonGroupCaptionAreaHasPadding = true;
  1854. m_nRibbonGroupCaptionAreaHeightExpanded = 16;
  1855. m_nRibbonGroupCaptionAreaHeightCollapsed = 16;
  1856. m_nRibbonCaptionPartHeight = 17;
  1857. m_nRibbonGroupIconBkVertOffset = 2;
  1858. m_clrRibbonComboBackGroundNormal = RGB(232,232,232);
  1859. m_nRibbonTabIntersectionHeight = 1;
  1860. m_clrRibbonButtonDisabled = RGB(128,128,128);
  1861. m_clrRibbonGroupCaptionTextExpanded = RGB( 250, 250, 250 );
  1862. m_nRibbonGroupCaptionTextDF
  1863. = m_nRibbonGroupCaptionTextShadowDF
  1864. = DT_SINGLELINE|DT_CENTER|DT_VCENTER|DT_END_ELLIPSIS;
  1865. m_rcRibbonPageBkPadding.SetRect( 5, 19, 5, 10 );
  1866. VERIFY(
  1867. m_bmpRibbonPageBk.LoadBMP_Resource(
  1868. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_PAGE_BK_R2_OBSIDIAN)
  1869. )
  1870. );
  1871. m_bmpRibbonPageBk.PreMultipliedRGBChannelsSet( true );
  1872. m_rcRibbonGroupPaddingBkExpanded.SetRect( 4, 4, 4, 4 );
  1873. VERIFY(
  1874. m_bmpRibbonGroupBkExpanded[0].LoadBMP_Resource(
  1875. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_NORMAL_BK_R2_OBSIDIAN)
  1876. )
  1877. );
  1878. VERIFY(
  1879. m_bmpRibbonGroupBkExpanded[1].LoadBMP_Resource(
  1880. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_EXPANDED_HOVER_BK_R2_OBSIDIAN)
  1881. )
  1882. );
  1883. m_rcRibbonGroupPaddingBkCollapsed.SetRect( 4, 18, 4, 4 );
  1884. VERIFY(
  1885. m_bmpRibbonGroupBkCollapsed[0].LoadBMP_Resource(
  1886. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_NORMAL_BK_R2_OBSIDIAN)
  1887. )
  1888. );
  1889. VERIFY(
  1890. m_bmpRibbonGroupBkCollapsed[1].LoadBMP_Resource(
  1891. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_HOVER_BK_R2_OBSIDIAN)
  1892. )
  1893. );
  1894. VERIFY(
  1895. m_bmpRibbonGroupBkCollapsed[2].LoadBMP_Resource(
  1896. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_PRESSED_BK_R2_OBSIDIAN)
  1897. )
  1898. );
  1899. VERIFY(
  1900. m_bmpRibbonGroupBkCollapsed[3].LoadBMP_Resource(
  1901. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_GROUP_COLLAPSED_SELECTED_BK_R2)
  1902. )
  1903. );
  1904. // VERIFY(
  1905. // m_bmpRibbonIconBkCollapsed[0].LoadBMP_Resource(
  1906. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_NORMAL_BK_R2_OBSIDIAN)
  1907. // )
  1908. // );
  1909. // VERIFY(
  1910. // m_bmpRibbonIconBkCollapsed[1].LoadBMP_Resource(
  1911. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_HOVER_BK_R2_OBSIDIAN)
  1912. // )
  1913. // );
  1914. // VERIFY(
  1915. // m_bmpRibbonIconBkCollapsed[2].LoadBMP_Resource(
  1916. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_ICON_COLLAPSED_PRESSED_BK_R2_OBSIDIAN)
  1917. // )
  1918. // );
  1919. INT nBkIndex, nBkCount;
  1920. nBkCount = sizeof( m_bmpRibbonGroupBkExpanded ) / sizeof( m_bmpRibbonGroupBkExpanded[0] );
  1921. for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  1922. {
  1923. m_bmpRibbonGroupBkExpanded[nBkIndex].Make32();
  1924. m_bmpRibbonGroupBkExpanded[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1925. } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  1926. nBkCount = sizeof( m_bmpRibbonGroupBkCollapsed ) / sizeof( m_bmpRibbonGroupBkCollapsed[0] );
  1927. for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  1928. {
  1929. m_bmpRibbonGroupBkCollapsed[nBkIndex].Make32();
  1930. m_bmpRibbonGroupBkCollapsed[nBkIndex].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1931. } // for( nBkIndex = 0; nBkIndex < nBkCount; nBkIndex ++ )
  1932. VERIFY(
  1933. m_bmpRibbonIconBkCF.LoadBMP_Resource(
  1934. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_COLLAPSED_ICON_FRAME_R2_OBSIDIAN)
  1935. )
  1936. );
  1937.   m_bmpRibbonIconBkCF.PreMultiplyRGBChannels( false );
  1938. //  m_bmpRibbonIconBkCF.PreMultipliedRGBChannelsSet( true );
  1939. m_nRibbonSeparatorDrawModeH = INT( CExtBitmap::__EDM_STRETCH );
  1940. m_nRibbonSeparatorDrawModeV = INT( CExtBitmap::__EDM_STRETCH );
  1941. m_rcRibbonSeparatorPaddingH.SetRect( 6, 0, 6, 0 );
  1942. VERIFY(
  1943. m_bmpRibbonSeparatorH.LoadBMP_Resource(
  1944. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_H_R2_OBSIDIAN)
  1945. )
  1946. );
  1947. VERIFY( m_bmpRibbonSeparatorH.Make32() );
  1948. m_bmpRibbonSeparatorH.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1949. m_rcRibbonSeparatorPaddingV.SetRect( 0, 6, 0, 6 );
  1950. VERIFY(
  1951. m_bmpRibbonSeparatorV.LoadBMP_Resource(
  1952. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_SEPARATOR_V_R2_OBSIDIAN)
  1953. )
  1954. );
  1955. VERIFY( m_bmpRibbonSeparatorV.Make32() );
  1956. m_bmpRibbonSeparatorV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  1957. m_nRibbonHeightOfQACEB = 22;
  1958. m_nIdxRibbonQACEB_Selected = 3;
  1959. VERIFY(
  1960. m_bmpArrRibbonQACEB.LoadBMP_Resource(
  1961. MAKEINTRESOURCE(IDB_EXT_2007_QATB_CEB_R2_OBSIDIAN)
  1962. )
  1963. );
  1964. m_bmpArrRibbonQACEB.PreMultiplyRGBChannels();
  1965. m_bmpArrRibbonQACEB.PreMultipliedRGBChannelsSet( true );
  1966. m_clrRibbon_EmbeddedCaptionTextLeft = RGB(255,255,255);
  1967. m_clrRibbon_EmbeddedCaptionTextRight = RGB(180,216,255);
  1968. m_bRibbonFileButtonItegrationSupported = true;
  1969. INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
  1970. INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
  1971. CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
  1972. m_rcRibbonNcCornerLeftCP.SetRect( 22, 8, 2, 2 );
  1973. m_rcRibbonNcCornerRightCP.SetRect( 2, 8, 22, 2 );
  1974. VERIFY(
  1975. m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
  1976. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R2_OBSIDIAN)
  1977. )
  1978. );
  1979. m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
  1980. //  m_bmpRibbonNcCornerActiveLeft.Make32();
  1981. //  m_bmpRibbonNcCornerActiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  1982. m_bmpRibbonNcCornerActiveLeft.Scale(
  1983. m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
  1984. nCaptionHeightActive,
  1985. _fBox
  1986. );
  1987. VERIFY(
  1988. m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
  1989. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R2_OBSIDIAN)
  1990. )
  1991. );
  1992. m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
  1993. //  m_bmpRibbonNcCornerInactiveLeft.Make32();
  1994. //  m_bmpRibbonNcCornerInactiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  1995. m_bmpRibbonNcCornerInactiveLeft.Scale(
  1996. m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
  1997. nCaptionHeightInactive,
  1998. _fBox
  1999. );
  2000. VERIFY(
  2001. m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
  2002. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R2_OBSIDIAN)
  2003. )
  2004. );
  2005. m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
  2006. //  m_bmpRibbonNcCornerActiveRight.Make32();
  2007. //  m_bmpRibbonNcCornerActiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  2008. m_bmpRibbonNcCornerActiveRight.Scale(
  2009. m_bmpRibbonNcCornerActiveRight.GetSize().cx,
  2010. nCaptionHeightActive,
  2011. _fBox
  2012. );
  2013. VERIFY(
  2014. m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
  2015. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R2_OBSIDIAN)
  2016. )
  2017. );
  2018. m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
  2019. //  m_bmpRibbonNcCornerInactiveRight.Make32();
  2020. //  m_bmpRibbonNcCornerInactiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
  2021. m_bmpRibbonNcCornerInactiveRight.Scale(
  2022. m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
  2023. nCaptionHeightInactive,
  2024. _fBox
  2025. );
  2026. VERIFY(
  2027. m_bmpRibbonNcCornerHT.LoadBMP_Resource(
  2028. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_OBSIDIAN)
  2029. )
  2030. );
  2031. m_bmpRibbonNcCornerHT.Make32();
  2032. m_bmpRibbonNcCornerHT.Scale(
  2033. m_bmpRibbonNcCornerHT.GetSize().cx,
  2034. nCaptionHeightActive,
  2035. _fBox
  2036. );
  2037. VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_R2_OBSIDIAN) ) );
  2038. //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
  2039. m_rcPaddingRibbonQuickAccessBarBkAtTheBottom.SetRect( 3, 3, 3, 3 );
  2040. VERIFY( m_bmpRibbonQuickAccessBarBkAtTheBottom.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_QATB_BK_R2_OBSIDIAN) ) );
  2041. m_nRibbonHeightOfOneDLB = 14;
  2042. m_nDlbIdxDisabled = 3;
  2043. m_nDlbIdxNormal = 0;
  2044. m_nDlbIdxHover = 1;
  2045. m_nDlbIdxPressed = 2;
  2046. rcRibbonContentPaddingDLB.SetRect( 2, 2, 2, 2 );
  2047. VERIFY( m_arrBmpRibbonDLB.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_GCB_R2_OBSIDIAN) ) );
  2048. m_arrBmpRibbonDLB.PreMultiplyRGBChannels();
  2049. m_arrBmpRibbonDLB.PreMultipliedRGBChannelsSet( true );
  2050. m_clrRibbonGalleryInplaceBorderNormal = RGB(172,172,172);
  2051. m_clrRibbonGalleryInplaceBorderHover  = RGB(172,172,172);
  2052. m_clrRibbonGalleryInplaceBkgndNormal  = RGB(218,226,226);
  2053. m_clrRibbonGalleryInplaceBkgndHover   = RGB(247,247,247);
  2054. m_rcRibbonGalleryScrollFill = RGB(218,226,226);
  2055. m_rcRibbonGalleryScrollButtonPadding.SetRect( 4, 4, 4, 4 );
  2056. m_nHeightRibbonGalleryScrollButton = -1;
  2057. m_nIndexRibbonGalleryScrollButtonDisabled = 4;
  2058. m_nIndexRibbonGalleryScrollButtonNormal = 1;
  2059. m_nIndexRibbonGalleryScrollButtonHover = 2;
  2060. m_nIndexRibbonGalleryScrollButtonPressed = 3;
  2061. VERIFY( m_bmpArrRibbonGalleryScrollButtonDown.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_DOWN_R2_OBSIDIAN) ) );
  2062. VERIFY( m_bmpArrRibbonGalleryScrollButtonUp.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_UP_R2_OBSIDIAN) ) );
  2063. VERIFY( m_bmpArrRibbonGalleryScrollButtonMenu.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RGIBTN_MENU_R2_OBSIDIAN) ) );
  2064. #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
  2065. VERIFY( m_bmpRibbonDDA.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_DDA_R2_OBSIDIAN) ) );
  2066. VERIFY( m_bmpRibbonDDA.Make32() );
  2067. m_bmpRibbonDDA.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2068. VERIFY( m_bmpArrRibbonComboBoxDropDown.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_COMBO_BOX_BUTTON_R2_OBSIDIAN) ) );
  2069. // tool buttons 2007
  2070. m_arrIndicesButtonTS[INT(__E07BI_NORMAL)] = 0;
  2071. m_arrIndicesButtonTS[INT(__E07BI_HOVER)] = 3;
  2072. m_arrIndicesButtonTS[INT(__E07BI_PRESSED)] = 2;
  2073. m_arrIndicesButtonTS[INT(__E07BI_HDD)] = 3;
  2074. m_arrIndicesButtonTS[INT(__E07BI_SEL_T)] = 1;
  2075. m_arrIndicesButtonTS[INT(__E07BI_INDETERMINATE)] = 0;
  2076. m_arrIndicesButtonSS_Left[INT(__E07BI_NORMAL)] = -1;
  2077. m_arrIndicesButtonSS_Left[INT(__E07BI_HOVER)] = 0;
  2078. m_arrIndicesButtonSS_Left[INT(__E07BI_PRESSED)] = 1;
  2079. m_arrIndicesButtonSS_Left[INT(__E07BI_HDD)] = 2;
  2080. m_arrIndicesButtonSS_Left[INT(__E07BI_SEL_T)] = 5;
  2081. m_arrIndicesButtonSS_Left[INT(__E07BI_INDETERMINATE)] = 4;
  2082. m_arrIndicesButtonSS_Right[INT(__E07BI_NORMAL)] = -1;
  2083. m_arrIndicesButtonSS_Right[INT(__E07BI_HOVER)] = 0;
  2084. m_arrIndicesButtonSS_Right[INT(__E07BI_PRESSED)] = 1;
  2085. m_arrIndicesButtonSS_Right[INT(__E07BI_HDD)] = 2;
  2086. m_arrIndicesButtonSS_Right[INT(__E07BI_SEL_T)] = 4;
  2087. m_arrIndicesButtonSS_Right[INT(__E07BI_INDETERMINATE)] = 3;
  2088. m_arrIndicesButtonLSM[INT(__E07BI_NORMAL)] = -1;
  2089. m_arrIndicesButtonLSM[INT(__E07BI_HOVER)] = 0;
  2090. m_arrIndicesButtonLSM[INT(__E07BI_PRESSED)] = 1;
  2091. m_arrIndicesButtonLSM[INT(__E07BI_HDD)] = 2;
  2092. m_arrIndicesButtonLSM[INT(__E07BI_SEL_T)] = 0;
  2093. m_arrIndicesButtonLSM[INT(__E07BIX_INDETERMINATE)] = 0;
  2094. // m_arrIndicesButtonLSB[INT(__E07BI_NORMAL)] = -1;
  2095. // m_arrIndicesButtonLSB[INT(__E07BI_HOVER)] = 0;
  2096. // m_arrIndicesButtonLSB[INT(__E07BI_PRESSED)] = 1;
  2097. // m_arrIndicesButtonLSB[INT(__E07BI_HDD)] = 2;
  2098. // m_arrIndicesButtonLSB[INT(__E07BI_SEL_T)] = 0;
  2099. // m_arrIndicesButtonLSB[INT(__E07BI_INDETERMINATE)] = 0;
  2100. m_arrIndicesButtonLSXM[INT(__E07BIX_NORMAL)] = -1;
  2101. m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER)] = 0;
  2102. m_arrIndicesButtonLSXM[INT(__E07BIX_HOVER2)] = 5;
  2103. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED)] = 1;
  2104. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED2)] = 2;
  2105. m_arrIndicesButtonLSXM[INT(__E07BIX_PRESSED3)] = 3;
  2106. m_arrIndicesButtonLSXM[INT(__E07BIX_INDETERMINATE)] = 4;
  2107. m_arrIndicesButtonLSXM[INT(__E07BIX_SELECTED)] = 5;
  2108. m_arrIndicesButtonLSXB[INT(__E07BIX_NORMAL)] = -1;
  2109. m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER)] = 0;
  2110. m_arrIndicesButtonLSXB[INT(__E07BIX_HOVER2)] = 4;
  2111. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED)] = 1;
  2112. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED2)] = 2;
  2113. m_arrIndicesButtonLSXB[INT(__E07BIX_PRESSED3)] = 2;
  2114. m_arrIndicesButtonLSXB[INT(__E07BIX_INDETERMINATE)] = 3;
  2115. m_arrIndicesButtonLSXB[INT(__E07BIX_SELECTED)] = 4;
  2116. VERIFY(
  2117. m_bmpArrButtonTS[INT(__EBTSA_SOLID)].LoadBMP_Resource(
  2118. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SOLID_R2_OBSIDIAN)
  2119. )
  2120. );
  2121. m_bmpArrButtonTS[INT(__EBTSA_SOLID)].PreMultipliedRGBChannelsSet( true );
  2122. VERIFY(
  2123. m_bmpArrButtonTS[INT(__EBTSA_LEFT)].LoadBMP_Resource(
  2124. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_LEFT_R2_OBSIDIAN)
  2125. )
  2126. );
  2127. m_bmpArrButtonTS[INT(__EBTSA_LEFT)].PreMultipliedRGBChannelsSet( true );
  2128. VERIFY(
  2129. m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].LoadBMP_Resource(
  2130. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_MIDDLE_R2_OBSIDIAN)
  2131. )
  2132. );
  2133. m_bmpArrButtonTS[INT(__EBTSA_MIDDLE)].PreMultipliedRGBChannelsSet( true );
  2134. VERIFY(
  2135. m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].LoadBMP_Resource(
  2136. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_RIGHT_R2_OBSIDIAN)
  2137. )
  2138. );
  2139. m_bmpArrButtonTS[INT(__EBTSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
  2140. VERIFY(
  2141. m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].LoadBMP_Resource(
  2142. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_LEFT_R2)
  2143. )
  2144. );
  2145. m_bmpArrButtonSS_DD[INT(__EBSSA_LEFT)].PreMultipliedRGBChannelsSet( true );
  2146. VERIFY(
  2147. m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].LoadBMP_Resource(
  2148. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_SMALL_RIGHT_R2)
  2149. )
  2150. );
  2151. m_bmpArrButtonSS_DD[INT(__EBSSA_RIGHT)].PreMultipliedRGBChannelsSet( true );
  2152. m_bmpArrButtonSS_simple = m_bmpArrButtonSS_DD[ INT(__EBSSA_LEFT) ];
  2153. if( ! m_bmpArrButtonSS_simple.IsEmpty() )
  2154. {
  2155. CSize _sizeBmp = m_bmpArrButtonSS_simple.GetSize();
  2156. INT nY = 0, nXRange = _sizeBmp.cx / 2;
  2157. for( ; nY < _sizeBmp.cy; nY ++ )
  2158. {
  2159. INT nXSrc = nXRange - 1, nXDst = _sizeBmp.cx - nXRange;
  2160. for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
  2161. {
  2162. RGBQUAD _pixel;
  2163. VERIFY( m_bmpArrButtonSS_simple.GetPixel( nXSrc, nY, _pixel ) );
  2164. VERIFY( m_bmpArrButtonSS_simple.SetPixel( nXDst, nY, _pixel ) );
  2165. } // for( ; nXDst < _sizeBmp.cx; nXDst ++, nXSrc -- )
  2166. } // for( ; nY < _sizeBmp.cy; nY ++ )
  2167. } // if( m_bmpArrButtonSS_simple.IsEmpty() )
  2168. VERIFY(
  2169. m_bmpArrButtonLSM.LoadBMP_Resource(
  2170. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_ALL_R2) // IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2
  2171. )
  2172. );
  2173. // m_bmpArrButtonLSM.PreMultipliedRGBChannelsSet( true );
  2174. // VERIFY(
  2175. // m_bmpArrButtonLSB.LoadBMP_Resource(
  2176. // MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  2177. // )
  2178. // );
  2179. // m_bmpArrButtonLSB.PreMultipliedRGBChannelsSet( true );
  2180. VERIFY(
  2181. m_bmpArrButtonLSXM.LoadBMP_Resource(
  2182. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_TOP_R2)
  2183. )
  2184. );
  2185. m_bmpArrButtonLSXM.PreMultipliedRGBChannelsSet( true );
  2186. VERIFY(
  2187. m_bmpArrButtonLSXB.LoadBMP_Resource(
  2188. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_BOTTOM_R2)
  2189. )
  2190. );
  2191. m_bmpArrButtonLSXB.PreMultipliedRGBChannelsSet( true );
  2192. VERIFY(
  2193. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].LoadBMP_Resource(
  2194. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_HOVER_R2)
  2195. )
  2196. );
  2197. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].Make32();
  2198. m_bmpToolBtnSeparator[INT(__ETBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2199. VERIFY(
  2200. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].LoadBMP_Resource(
  2201. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_TB_SEPARATOR_PRESSED_R2)
  2202. )
  2203. );
  2204. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].Make32();
  2205. m_bmpToolBtnSeparator[INT(__ETBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2206. VERIFY(
  2207. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].LoadBMP_Resource(
  2208. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_HOVER_R2)
  2209. )
  2210. );
  2211. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].Make32();
  2212. m_bmpLargeBtnSeparator[INT(__ELBS_HOVER)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2213. VERIFY(
  2214. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].LoadBMP_Resource(
  2215. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_BTN_PART_LARGE_SEPARATOR_PRESSED_R2)
  2216. )
  2217. );
  2218. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].Make32();
  2219. m_bmpLargeBtnSeparator[INT(__ELBS_PRESSED)].AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2220. VERIFY( m_bmpRibbonMenuResizingMarginHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_HV_OBSIDIAN) ) );
  2221. VERIFY( m_bmpRibbonMenuResizingMarginV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRB_V_OBSIDIAN) ) );
  2222. VERIFY( m_bmpRibbonMenuResizingGripperHV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_HV_OBSIDIAN) ) );
  2223. m_bmpRibbonMenuResizingGripperHV.Make32();
  2224. m_bmpRibbonMenuResizingGripperHV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2225. VERIFY( m_bmpRibbonMenuResizingGripperV.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_MRG_V_OBSIDIAN) ) );
  2226. m_bmpRibbonMenuResizingGripperV.Make32();
  2227. m_bmpRibbonMenuResizingGripperV.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2228. m_clrRibbonModeMenuTextNormal = RGB(0,0,0);
  2229. VERIFY(
  2230. m_bmpRibbonModeMenuBorder.LoadBMP_Resource(
  2231. MAKEINTRESOURCE(IDB_EXT_2007_MENU_BORDER_R2)
  2232. )
  2233. );
  2234. m_bmpRibbonModeMenuBorder.Make32();
  2235. m_bmpRibbonModeMenuBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2236. m_clrMenuCaptionText = RGB(20,20,90);
  2237. m_rcMenuCaptionBmpPadding.SetRect( 0, 2, 0, 2 );
  2238. VERIFY(
  2239. m_bmpMenuCaptionBk.LoadBMP_Resource(
  2240. MAKEINTRESOURCE(IDB_EXT_2007_MENU_CAPTION_BK_R2_OBSIDIAN)
  2241. )
  2242. );
  2243. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 12, 6, 29 );
  2244. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R2_OBSIDIAN) ) );
  2245. m_bmpRibbonFileMenuBigBorder.Make32();
  2246. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2247. m_rcPaddingRibbonFileMenuOptionsButton.SetRect( 2, 2, 2, 2 );
  2248. VERIFY(
  2249. m_bmpRibbonFileMenuOptionsButtonCold.LoadBMP_Resource(
  2250. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_COLD_R2_OBSIDIAN)
  2251. )
  2252. );
  2253. m_bmpRibbonFileMenuOptionsButtonCold.Make32();
  2254. m_bmpRibbonFileMenuOptionsButtonCold.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2255. VERIFY(
  2256. m_bmpRibbonFileMenuOptionsButtonHot.LoadBMP_Resource(
  2257. MAKEINTRESOURCE(IDB_EXT_2007_RM_OPTION_HOT_R2)
  2258. )
  2259. );
  2260. m_bmpRibbonFileMenuOptionsButtonHot.Make32();
  2261. m_bmpRibbonFileMenuOptionsButtonHot.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2262. VERIFY( m_bmpResizingGripper.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RESIZING_GRIPPER_R2_OBSIDIAN) ) );
  2263. m_bmpResizingGripper.PreMultipliedRGBChannelsSet( true );
  2264. // spin bitmaps
  2265. VERIFY( m_arrBmpSpinArrowDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_DOWN_OBSIDIAN) ) );
  2266. VERIFY( m_arrBmpSpinArrowUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_ARROW_UP_OBSIDIAN) ) );
  2267. VERIFY( m_arrBmpSpinDown. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_DOWN_OBSIDIAN) ) );
  2268. VERIFY( m_arrBmpSpinUp. LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_SPIN_UP_OBSIDIAN) ) );
  2269. #if (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  2270. m_clrShortcutListItemAlternativeText = RGB(255,255,255);
  2271. m_bShortcutListUseDockerBkgnd = true;
  2272. #endif // (!defined __EXT_MFC_NO_SHORTCUTLIST_CTRL)
  2273. }
  2274. CExtPaintManagerOffice2007_R3_Obsidian::CExtPaintManagerOffice2007_R3_Obsidian()
  2275. {
  2276. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  2277. m_nQatbAdditionalSpaceAtRightDWM = 0;
  2278. //  INT nCaptionHeightActive = NcFrame_GetCaptionHeight( true, NULL ) + m_rcNcFrameBordersActive.top;
  2279. //  INT nCaptionHeightInactive = NcFrame_GetCaptionHeight( false, NULL ) + m_rcNcFrameBordersInactive.top;
  2280. //  CExtBitmap::Filter _fBox( CExtBitmap::Filter::box );
  2281. m_rcRibbonNcCornerLeftCP.SetRect( 53, 2, 2, 2 );
  2282. m_rcRibbonNcCornerRightCP.SetRect( 2, 2, 42, 2 );
  2283. VERIFY(
  2284. m_bmpRibbonNcCornerDwmLeft.LoadBMP_Resource(
  2285. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_LEFT_R3_OBSIDIAN)
  2286. )
  2287. );
  2288. //m_bmpRibbonNcCornerDwmLeft.PreMultipliedRGBChannelsSet( true );
  2289. VERIFY(
  2290. m_bmpRibbonNcCornerDwmRight.LoadBMP_Resource(
  2291. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_DWM_RIGHT_R3_OBSIDIAN)
  2292. )
  2293. );
  2294. //m_bmpRibbonNcCornerDwmRight.PreMultipliedRGBChannelsSet( true );
  2295. m_bmpRibbonNcCornerDwmLeft.AdjustAlpha( -0.60 );
  2296. m_bmpRibbonNcCornerDwmRight.AdjustAlpha( -0.60 );
  2297. VERIFY(
  2298. m_bmpRibbonNcCornerActiveLeft.LoadBMP_Resource(
  2299. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_LEFT_R3_OBSIDIAN)
  2300. )
  2301. );
  2302. //  m_bmpRibbonNcCornerActiveLeft.PreMultipliedRGBChannelsSet( true );
  2303. //  m_bmpRibbonNcCornerActiveLeft.Scale(
  2304. //  m_bmpRibbonNcCornerActiveLeft.GetSize().cx,
  2305. //  nCaptionHeightActive,
  2306. //  _fBox
  2307. //  );
  2308. VERIFY( m_bmpRibbonNcCornerActiveLeft.Make32() );
  2309. m_bmpRibbonNcCornerActiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2310. VERIFY(
  2311. m_bmpRibbonNcCornerInactiveLeft.LoadBMP_Resource(
  2312. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_LEFT_R3_OBSIDIAN)
  2313. )
  2314. );
  2315. //  m_bmpRibbonNcCornerInactiveLeft.PreMultipliedRGBChannelsSet( true );
  2316. //  m_bmpRibbonNcCornerInactiveLeft.Scale(
  2317. //  m_bmpRibbonNcCornerInactiveLeft.GetSize().cx,
  2318. //  nCaptionHeightInactive,
  2319. //  _fBox
  2320. //  );
  2321. VERIFY( m_bmpRibbonNcCornerInactiveLeft.Make32() );
  2322. m_bmpRibbonNcCornerInactiveLeft.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2323. VERIFY(
  2324. m_bmpRibbonNcCornerActiveRight.LoadBMP_Resource(
  2325. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_ACTIVE_RIGHT_R3_OBSIDIAN)
  2326. )
  2327. );
  2328. //  m_bmpRibbonNcCornerActiveRight.PreMultipliedRGBChannelsSet( true );
  2329. //  m_bmpRibbonNcCornerActiveRight.Scale(
  2330. //  m_bmpRibbonNcCornerActiveRight.GetSize().cx,
  2331. //  nCaptionHeightActive,
  2332. //  _fBox
  2333. //  );
  2334. VERIFY( m_bmpRibbonNcCornerActiveRight.Make32() );
  2335. m_bmpRibbonNcCornerActiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2336. VERIFY(
  2337. m_bmpRibbonNcCornerInactiveRight.LoadBMP_Resource(
  2338. MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_INACTIVE_RIGHT_R3_OBSIDIAN)
  2339. )
  2340. );
  2341. //  m_bmpRibbonNcCornerInactiveRight.PreMultipliedRGBChannelsSet( true );
  2342. //  m_bmpRibbonNcCornerInactiveRight.Scale(
  2343. //  m_bmpRibbonNcCornerInactiveRight.GetSize().cx,
  2344. //  nCaptionHeightInactive,
  2345. //  _fBox
  2346. //  );
  2347. VERIFY( m_bmpRibbonNcCornerInactiveRight.Make32() );
  2348. m_bmpRibbonNcCornerInactiveRight.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2349. //  VERIFY(
  2350. //  m_bmpRibbonNcCornerHT.LoadBMP_Resource(
  2351. //  MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_NC_CORNER_HT_MASK_R2_OBSIDIAN)
  2352. //  )
  2353. //  );
  2354. //  m_bmpRibbonNcCornerHT.Make32();
  2355. //  m_bmpRibbonNcCornerHT.Scale(
  2356. //  m_bmpRibbonNcCornerHT.GetSize().cx,
  2357. //  nCaptionHeightActive,
  2358. //  _fBox
  2359. //  );
  2360. m_bmpRibbonNcCornerHT.Empty();
  2361. VERIFY( m_bmpArrRibbonFileButton.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RIBBON_FILE_BUTTON_R3_OBSIDIAN) ) );
  2362. //m_bmpArrRibbonFileButton.PreMultipliedRGBChannelsSet( true );
  2363. m_rcPaddingRibbonFileMenuBigBorder.SetRect( 6, 18, 6, 29 );
  2364. VERIFY( m_bmpRibbonFileMenuBigBorder.LoadBMP_Resource( MAKEINTRESOURCE(IDB_EXT_2007_RM_BIG_BORDER_R3_OBSIDIAN) ) );
  2365. m_bmpRibbonFileMenuBigBorder.Make32();
  2366. m_bmpRibbonFileMenuBigBorder.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
  2367. m_sizeAboveTheRibbonShiftQACEB.cx = 10;
  2368. m_sizeAboveTheRibbonShiftQACEB.cy = 0;
  2369. m_nRibbonFileButtonMenuIntersectionHeight = 20;
  2370. #endif // (!defined __EXT_MFC_NO_RIBBON_BAR)
  2371. }
  2372. CExtPaintManagerOffice2007_R2_Obsidian::~CExtPaintManagerOffice2007_R2_Obsidian()
  2373. {
  2374. }
  2375. CExtPaintManagerOffice2007_R3_Obsidian::~CExtPaintManagerOffice2007_R3_Obsidian()
  2376. {
  2377. }
  2378. void CExtPaintManagerOffice2007_Impl::InitTranslatedColors()
  2379. {
  2380. CExtPaintManagerOffice2003::InitTranslatedColors();
  2381. m_mapColorTranslate[_2003CLR_EXPBTN_HOVER_LIGHT] = InstallColor( RGB(255,251,214) );
  2382. m_mapColorTranslate[_2003CLR_EXPBTN_HOVER_DARK] = InstallColor( RGB(255,195,115) );
  2383. m_mapColorTranslate[_2003CLR_EXPBTN_PRESSED_LIGHT] = InstallColor( RGB(255,219,148) );
  2384. m_mapColorTranslate[_2003CLR_EXPBTN_PRESSED_DARK] = InstallColor( RGB(255,150,82) );
  2385. }
  2386. void CExtPaintManagerOffice2007_R1::InitTranslatedColors()
  2387. {
  2388. CExtPaintManagerOffice2007_Impl::InitTranslatedColors();
  2389. #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2390. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_LIGHT] = InstallColor( RGB(240,241,242) );
  2391. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_DARK] = InstallColor( RGB(221,224,227) );
  2392. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_LIGHT] = InstallColor( RGB(255,255,255) );
  2393. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_DARK] = InstallColor( RGB(232,234,236) );
  2394. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_BOTTOM_LINE] = InstallColor( RGB(199,203,209) );
  2395. m_mapColorTranslate[_2003CLR_PN_ITEM_LIGHT] = InstallColor( RGB(223,226,229) );
  2396. m_mapColorTranslate[_2003CLR_PN_ITEM_DARK] = InstallColor( RGB(225,227,230) );
  2397. m_mapColorTranslate[_2003CLR_PN_GRIPPER_LIGHT] = InstallColor( RGB(240,241,242) );
  2398. m_mapColorTranslate[_2003CLR_PN_GRIPPER_DARK] = InstallColor( RGB(189,194,201) );
  2399. m_mapColorTranslate[_2003CLR_PN_BORDER] = InstallColor( RGB(119,130,153) );
  2400. m_mapColorTranslate[CLR_PN_CAPTION_TEXT] = InstallColor( RGB(51,51,51) );
  2401. #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2402. m_mapColorTranslate[CLR_GROUP_BOX_FRAME] = InstallColor( RGB(140,140,140) );
  2403. m_mapColorTranslate[CLR_WRB_FRAME] = InstallColor( RGB(140,140,140) );
  2404. m_mapColorTranslate[_2003CLR_EXPBTN_LIGHT] = InstallColor( RGB(178, 183, 191) );
  2405. m_mapColorTranslate[_2003CLR_EXPBTN_DARK] = InstallColor( RGB(76, 83, 92) );
  2406. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_LIGHT] = InstallColor( RGB(242, 242, 242) );
  2407. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_MIDDLE] = InstallColor( RGB(224, 224, 224) );
  2408. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_DARK] = InstallColor( RGB(186, 186, 186) );
  2409. m_mapColorTranslate[_2003CLR_TOOLBAR_BOTTOM_LINE] = InstallColor( RGB(83, 96, 125) );
  2410. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_LIGHT] = InstallColor( RGB(255,255,255) );
  2411. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_DARK] = InstallColor( RGB(130,135,146) );
  2412. m_mapColorTranslate[_2003CLR_SEPARATOR_LIGHT] = InstallColor( RGB(255,255,255) );
  2413. m_mapColorTranslate[_2003CLR_SEPARATOR_DARK] = InstallColor( RGB(130,135,146) );
  2414. m_mapColorTranslate[_2003CLR_MLA_NORM_LEFT] = InstallColor( RGB(239,239,239) );
  2415. m_mapColorTranslate[_2003CLR_MLA_NORM_MIDDLE] = InstallColor( RGB(239,239,239) );
  2416. m_mapColorTranslate[_2003CLR_MLA_NORM_RIGHT] = InstallColor( RGB(239,239,239) );
  2417. m_mapColorTranslate[_2003CLR_MLA_RARELY_LEFT] = InstallColor( RGB(242,242,242) );
  2418. m_mapColorTranslate[_2003CLR_MLA_RARELY_MIDDLE] = InstallColor( RGB(224, 224, 224) );
  2419. m_mapColorTranslate[_2003CLR_MLA_RARELY_RIGHT] = InstallColor( RGB(186, 186, 186) );
  2420. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_TOP] = InstallColor( RGB(239,239,239) );
  2421. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_BOTTOM] = InstallColor( RGB(239,239,239) );
  2422. m_mapColorTranslate[_2003CLR_BTN_HOVER_LEFT] = InstallColor( RGB(255,247,206) );
  2423. m_mapColorTranslate[_2003CLR_BTN_HOVER_RIGHT] = InstallColor( RGB(255,219,115) );
  2424. m_mapColorTranslate[_2003CLR_BTN_PRESSED_LEFT] = InstallColor( RGB(255,150,57) );
  2425. m_mapColorTranslate[_2003CLR_BTN_PRESSED_RIGHT] = InstallColor( RGB(255,186,90) );
  2426. m_mapColorTranslate[_2003CLR_BTN_HP_LEFT] = InstallColor( RGB(255,150,57) );
  2427. m_mapColorTranslate[_2003CLR_BTN_HP_RIGHT] = InstallColor( RGB(255,186,90) );
  2428. m_mapColorTranslate[XPCLR_MENU_BORDER] = InstallColor( RGB(83,96,125) );
  2429. m_mapColorTranslate[XPCLR_HILIGHT_BORDER] = InstallColor( RGB(83,96,125) );
  2430. m_mapColorTranslate[XPCLR_HILIGHT_BORDER_SELECTED] = m_mapColorTranslate[XPCLR_HILIGHT_BORDER]; 
  2431. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_LIGHT] = InstallColor( RGB(242,242,242) );
  2432. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_DARK] = InstallColor( RGB(186, 186, 186) );
  2433. m_mapColorTranslate[CLR_TEXT_DISABLED] = InstallColor( RGB(141,141,141) );
  2434. m_mapColorTranslate[COLOR_3DSHADOW] = InstallColor( RGB(141,141,141) );
  2435. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_NORMAL] = InstallColor( m_arrClrComboBoxBorder[0] );
  2436. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_DISABLED] = InstallColor( m_arrClrComboBoxBorder[3] );
  2437. m_mapColorTranslate[_2003CLR_GRADIENT_LIGHT] = 
  2438. m_mapColorTranslate[_2003CLR_GRADIENT_DARK] = InstallColor( m_clrFillHint );
  2439. }
  2440. void CExtPaintManagerOffice2007_R2_LunaBlue::InitTranslatedColors()
  2441. {
  2442. CExtPaintManagerOffice2007_Impl::InitTranslatedColors();
  2443. #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2444. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_LIGHT] = InstallColor( RGB(226, 239, 255) );
  2445. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_DARK] = InstallColor( RGB(214, 232, 255) );
  2446. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_LIGHT] = InstallColor( RGB(255, 255, 255) );
  2447. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_DARK] = InstallColor( RGB(227, 239, 255) );
  2448. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_BOTTOM_LINE] = InstallColor( RGB(173, 209, 255) );
  2449. m_mapColorTranslate[_2003CLR_PN_ITEM_LIGHT] = InstallColor( RGB(216, 233, 255) );
  2450. m_mapColorTranslate[_2003CLR_PN_ITEM_DARK] = InstallColor( RGB(216, 233, 255) );
  2451. m_mapColorTranslate[_2003CLR_PN_GRIPPER_LIGHT] = InstallColor( RGB(227, 239, 255) );
  2452. m_mapColorTranslate[_2003CLR_PN_GRIPPER_DARK] = InstallColor( RGB(175, 210, 255) );
  2453. m_mapColorTranslate[_2003CLR_PN_BORDER] = InstallColor( RGB(101, 147, 207) );
  2454. m_mapColorTranslate[CLR_PN_CAPTION_TEXT] = InstallColor( RGB(21, 66, 139) );
  2455. #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2456. m_mapColorTranslate[CLR_GROUP_BOX_FRAME] = InstallColor( RGB(101,147,207) );
  2457. m_mapColorTranslate[CLR_WRB_FRAME] = InstallColor( RGB(101,147,207) );
  2458. m_mapColorTranslate[_2003CLR_EXPBTN_LIGHT] = InstallColor( RGB(215, 232, 255) );
  2459. m_mapColorTranslate[_2003CLR_EXPBTN_DARK] = InstallColor( RGB(111, 157, 217) );
  2460. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_LIGHT] = InstallColor( RGB(227, 239, 255) );
  2461. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_MIDDLE] = InstallColor( RGB(227, 239, 255) );
  2462.   m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_DARK] = InstallColor( RGB(167, 205, 255) );
  2463. m_mapColorTranslate[_2003CLR_TOOLBAR_BOTTOM_LINE] = InstallColor( RGB(111, 157, 217) );
  2464. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_LIGHT] = InstallColor( RGB(255,255,255) );
  2465. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_DARK] = InstallColor( RGB(111,157,217) );
  2466. m_mapColorTranslate[_2003CLR_SEPARATOR_LIGHT] = InstallColor( RGB(255,255,255) );
  2467. m_mapColorTranslate[_2003CLR_SEPARATOR_DARK] = InstallColor( RGB(154,198,255) );
  2468. m_mapColorTranslate[_2003CLR_MLA_NORM_LEFT] = InstallColor( RGB(233, 238, 238) );
  2469. m_mapColorTranslate[_2003CLR_MLA_NORM_MIDDLE] = InstallColor( RGB(233, 238, 238) );
  2470. m_mapColorTranslate[_2003CLR_MLA_NORM_RIGHT] = InstallColor( RGB(233, 238, 238) );
  2471. m_mapColorTranslate[_2003CLR_MLA_RARELY_LEFT] = InstallColor( RGB(215, 227, 234) );
  2472. m_mapColorTranslate[_2003CLR_MLA_RARELY_MIDDLE] = InstallColor( RGB(215, 227, 234) );
  2473. m_mapColorTranslate[_2003CLR_MLA_RARELY_RIGHT] = InstallColor( RGB(215, 227, 234) );
  2474. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_TOP] = InstallColor( RGB(227, 239, 254) );
  2475. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_BOTTOM] = InstallColor( RGB(131, 176, 236) );
  2476. m_mapColorTranslate[_2003CLR_BTN_HOVER_LEFT] = InstallColor( RGB(255, 245, 204) );
  2477. m_mapColorTranslate[_2003CLR_BTN_HOVER_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2478. m_mapColorTranslate[_2003CLR_BTN_PRESSED_LEFT] = InstallColor( RGB(255, 245, 204) );
  2479. m_mapColorTranslate[_2003CLR_BTN_PRESSED_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2480. m_mapColorTranslate[_2003CLR_BTN_HP_LEFT] = InstallColor( RGB(252, 151, 61) );
  2481. m_mapColorTranslate[_2003CLR_BTN_HP_RIGHT] = InstallColor( RGB(255, 184, 94) );
  2482. m_mapColorTranslate[CLR_3DFACE_IN] = InstallColor( RGB(255, 231, 162) );
  2483. m_mapColorTranslate[XPCLR_MENU_BORDER] = InstallColor( RGB(101, 147, 207) );
  2484. m_mapColorTranslate[XPCLR_HILIGHT_BORDER] = InstallColor( RGB(255, 189, 105) );
  2485. m_mapColorTranslate[XPCLR_HILIGHT_BORDER_SELECTED] = m_mapColorTranslate[XPCLR_HILIGHT_BORDER]; 
  2486. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_LIGHT] = InstallColor( RGB(231,239,255) );
  2487. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_DARK] = InstallColor( RGB(140,182,239) );
  2488. m_mapColorTranslate[CLR_TEXT_DISABLED] = InstallColor( RGB(141,141,141) );
  2489. m_mapColorTranslate[COLOR_3DSHADOW] = InstallColor( RGB(141,141,141) );
  2490. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_R] = InstallColor( RGB(194, 220, 255) );
  2491. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_F] = InstallColor( RGB(194, 220, 255) );
  2492. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_NORMAL] = InstallColor( m_arrClrComboBoxBorder[0] );
  2493. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_DISABLED] = InstallColor( m_arrClrComboBoxBorder[3] );
  2494. m_mapColorTranslate[_2003CLR_GRADIENT_LIGHT] = 
  2495. m_mapColorTranslate[_2003CLR_GRADIENT_DARK] = InstallColor( RGB(191, 219, 255) );
  2496. }
  2497. void CExtPaintManagerOffice2007_R2_Silver::InitTranslatedColors()
  2498. {
  2499. CExtPaintManagerOffice2007_Impl::InitTranslatedColors();
  2500. #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2501. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_LIGHT] = InstallColor( RGB(243, 245, 245) );
  2502. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_DARK] = InstallColor( RGB(213, 219, 231) );
  2503. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_LIGHT] = InstallColor( RGB(255, 255, 255) );
  2504. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_DARK] = InstallColor( RGB(231, 234, 238) );
  2505. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_BOTTOM_LINE] = InstallColor( RGB(197, 199, 199) );
  2506. m_mapColorTranslate[_2003CLR_PN_ITEM_LIGHT] = InstallColor( RGB(223, 226, 229) );
  2507. m_mapColorTranslate[_2003CLR_PN_ITEM_DARK] = InstallColor( RGB(225, 227, 230) );
  2508. m_mapColorTranslate[_2003CLR_PN_GRIPPER_LIGHT] = InstallColor( RGB(246, 247, 248) );
  2509. m_mapColorTranslate[_2003CLR_PN_GRIPPER_DARK] = InstallColor( RGB(218, 223, 231) );
  2510. m_mapColorTranslate[_2003CLR_PN_BORDER] = InstallColor( RGB(111, 112, 116) );
  2511. m_mapColorTranslate[CLR_PN_CAPTION_TEXT] = InstallColor( RGB(21, 66, 139) );
  2512. #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2513. m_mapColorTranslate[CLR_GROUP_BOX_FRAME] = InstallColor( RGB(169,177,184) );
  2514. m_mapColorTranslate[CLR_WRB_FRAME] = InstallColor( RGB(169,177,184) );
  2515.   m_mapColorTranslate[_2003CLR_EXPBTN_LIGHT] = InstallColor( RGB(179, 178, 200) );
  2516.   m_mapColorTranslate[_2003CLR_EXPBTN_DARK] = InstallColor( RGB(118, 116, 146) );
  2517. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_LIGHT] = InstallColor( RGB(243, 244, 250) );
  2518. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_MIDDLE] = InstallColor( RGB(225, 226, 236) );
  2519. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_DARK] = InstallColor( RGB(134, 130, 166) );
  2520. m_mapColorTranslate[_2003CLR_TOOLBAR_BOTTOM_LINE] = InstallColor( RGB(124, 124, 148) );
  2521. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_LIGHT] = InstallColor( RGB(255,255,255) );
  2522. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_DARK] = InstallColor( RGB(84, 84, 117) );
  2523. m_mapColorTranslate[_2003CLR_SEPARATOR_LIGHT] = InstallColor( RGB(255, 255, 255) );
  2524. m_mapColorTranslate[_2003CLR_SEPARATOR_DARK] = InstallColor( RGB(110, 109, 143) );
  2525. m_mapColorTranslate[_2003CLR_MLA_NORM_LEFT] = InstallColor( RGB(239, 239, 239) );
  2526. m_mapColorTranslate[_2003CLR_MLA_NORM_MIDDLE] = InstallColor( RGB(239, 239, 239) );
  2527. m_mapColorTranslate[_2003CLR_MLA_NORM_RIGHT] = InstallColor( RGB(239, 239, 239) );
  2528. m_mapColorTranslate[_2003CLR_MLA_RARELY_LEFT] = InstallColor( RGB(215, 215, 226) );
  2529. m_mapColorTranslate[_2003CLR_MLA_RARELY_MIDDLE] = InstallColor( RGB(184, 185, 202) );
  2530. m_mapColorTranslate[_2003CLR_MLA_RARELY_RIGHT] = InstallColor( RGB(128, 126, 158) );
  2531. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_TOP] = InstallColor( RGB(232, 233, 241) );
  2532. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_BOTTOM] = InstallColor( RGB(172, 170, 194) );
  2533. m_mapColorTranslate[_2003CLR_BTN_HOVER_LEFT] = InstallColor( RGB(255, 245, 204) );
  2534. m_mapColorTranslate[_2003CLR_BTN_HOVER_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2535. m_mapColorTranslate[_2003CLR_BTN_PRESSED_LEFT] = InstallColor( RGB(255, 245, 204) );
  2536. m_mapColorTranslate[_2003CLR_BTN_PRESSED_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2537. m_mapColorTranslate[_2003CLR_BTN_HP_LEFT] = InstallColor( RGB(252, 151, 61) );
  2538. m_mapColorTranslate[_2003CLR_BTN_HP_RIGHT] = InstallColor( RGB(255, 184, 94) );
  2539. m_mapColorTranslate[CLR_3DFACE_IN] = InstallColor( RGB(255, 238, 194) );
  2540. m_mapColorTranslate[XPCLR_MENU_BORDER] = InstallColor( RGB(124, 124, 148) );
  2541. m_mapColorTranslate[XPCLR_HILIGHT_BORDER] = InstallColor( RGB(255, 189, 105) );
  2542. m_mapColorTranslate[XPCLR_HILIGHT_BORDER_SELECTED] = m_mapColorTranslate[XPCLR_HILIGHT_BORDER]; 
  2543. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_LIGHT] = InstallColor( RGB(249, 249, 255) );
  2544. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_DARK] = InstallColor( RGB(159, 157, 185) );
  2545. m_mapColorTranslate[CLR_TEXT_DISABLED] = InstallColor( RGB(141,141,141) );
  2546. m_mapColorTranslate[COLOR_3DSHADOW] = InstallColor( RGB(141,141,141) );
  2547. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_R] = InstallColor( RGB(219, 218, 228) );
  2548. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_F] = InstallColor( RGB(219, 218, 228) );
  2549. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_NORMAL] = InstallColor( m_arrClrComboBoxBorder[0] );
  2550. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_DISABLED] = InstallColor( m_arrClrComboBoxBorder[3] );
  2551. m_mapColorTranslate[_2003CLR_GRADIENT_LIGHT] = InstallColor( RGB(243, 243, 247) );
  2552. m_mapColorTranslate[_2003CLR_GRADIENT_DARK] = InstallColor( RGB(215, 215, 229) );
  2553. }
  2554. void CExtPaintManagerOffice2007_R2_Obsidian::InitTranslatedColors()
  2555. {
  2556. CExtPaintManagerOffice2007_Impl::InitTranslatedColors();
  2557. #if (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2558. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_LIGHT] = InstallColor( RGB(240, 241, 242) );
  2559. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_DARK] = InstallColor( RGB(221, 224, 227) );
  2560. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_LIGHT] = InstallColor( RGB(255, 255, 255) );
  2561. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_HOVER_DARK] = InstallColor( RGB(232, 234, 236) );
  2562. m_mapColorTranslate[_2003CLR_PN_PANE_CAPTION_BOTTOM_LINE] = InstallColor( RGB(199, 203, 209) );
  2563. m_mapColorTranslate[_2003CLR_PN_ITEM_LIGHT] = InstallColor( RGB(223, 226, 229) );
  2564. m_mapColorTranslate[_2003CLR_PN_ITEM_DARK] = InstallColor( RGB(225, 227, 230) );
  2565. m_mapColorTranslate[_2003CLR_PN_GRIPPER_LIGHT] = InstallColor( RGB(240, 241, 242) );
  2566. m_mapColorTranslate[_2003CLR_PN_GRIPPER_DARK] = InstallColor( RGB(189, 194, 201) );
  2567. m_mapColorTranslate[_2003CLR_PN_BORDER] = InstallColor( RGB(76, 83, 92) );
  2568. m_mapColorTranslate[CLR_PN_CAPTION_TEXT] = InstallColor( RGB(0, 0, 0) );
  2569. #endif // (!defined __EXT_MFC_NO_PAGE_NAVIGATOR )
  2570. m_mapColorTranslate[CLR_GROUP_BOX_FRAME] = InstallColor( RGB(132,132,132) );
  2571. m_mapColorTranslate[CLR_WRB_FRAME] = InstallColor( RGB(132,132,132) );
  2572. m_mapColorTranslate[_2003CLR_EXPBTN_LIGHT] = InstallColor( RGB(178, 183, 191) );
  2573. m_mapColorTranslate[_2003CLR_EXPBTN_DARK] = InstallColor( RGB(76, 83, 92) );
  2574. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_LIGHT] = InstallColor( RGB(205, 208, 213) );
  2575. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_MIDDLE] = InstallColor( RGB(187, 192, 198) );
  2576. m_mapColorTranslate[_2003CLR_TOOLBAR_GRADIENT_DARK] = InstallColor( RGB(138, 147, 157) );
  2577. m_mapColorTranslate[_2003CLR_TOOLBAR_BOTTOM_LINE] = InstallColor( RGB(76, 83, 92) );
  2578. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_LIGHT] = InstallColor( RGB(255, 255, 255) );
  2579. m_mapColorTranslate[_2003CLR_GRIPPER_DOT_DARK] = InstallColor( RGB(55, 60, 67) );
  2580. m_mapColorTranslate[_2003CLR_SEPARATOR_LIGHT] = InstallColor( RGB(221, 224, 227) );
  2581. m_mapColorTranslate[_2003CLR_SEPARATOR_DARK] = InstallColor( RGB(145, 153, 164) );
  2582. m_mapColorTranslate[_2003CLR_MLA_NORM_LEFT] = InstallColor( RGB(239, 239, 239) );
  2583. m_mapColorTranslate[_2003CLR_MLA_NORM_MIDDLE] = InstallColor( RGB(239, 239, 239) );
  2584. m_mapColorTranslate[_2003CLR_MLA_NORM_RIGHT] = InstallColor( RGB(239, 239, 239) );
  2585. m_mapColorTranslate[_2003CLR_MLA_RARELY_LEFT] = InstallColor( RGB(210, 213, 218) );
  2586. m_mapColorTranslate[_2003CLR_MLA_RARELY_MIDDLE] = InstallColor( RGB(187, 192, 199) );
  2587. m_mapColorTranslate[_2003CLR_MLA_RARELY_RIGHT] = InstallColor( RGB(197, 201, 207) );
  2588. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_TOP] = InstallColor( RGB(145, 153, 164) );
  2589. m_mapColorTranslate[_2003CLR_TBB_BK_COMBINED_BOTTOM] = InstallColor( RGB(97, 106, 118) );
  2590. m_mapColorTranslate[_2003CLR_BTN_HOVER_LEFT] = InstallColor( RGB(255, 245, 204) );
  2591. m_mapColorTranslate[_2003CLR_BTN_HOVER_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2592. m_mapColorTranslate[_2003CLR_BTN_PRESSED_LEFT] = InstallColor( RGB(255, 245, 204) );
  2593. m_mapColorTranslate[_2003CLR_BTN_PRESSED_RIGHT] = InstallColor( RGB(255, 219, 117) );
  2594. m_mapColorTranslate[_2003CLR_BTN_HP_LEFT] = InstallColor( RGB(252, 151, 61) );
  2595. m_mapColorTranslate[_2003CLR_BTN_HP_RIGHT] = InstallColor( RGB(255, 184, 94) );
  2596. m_mapColorTranslate[CLR_3DFACE_IN] = InstallColor( RGB(255, 231, 162) );
  2597. m_mapColorTranslate[XPCLR_MENU_BORDER] = InstallColor( RGB(145, 153, 164) );
  2598. m_mapColorTranslate[XPCLR_HILIGHT_BORDER] = InstallColor( RGB(255, 189, 105) );
  2599. m_mapColorTranslate[XPCLR_HILIGHT_BORDER_SELECTED] = m_mapColorTranslate[XPCLR_HILIGHT_BORDER]; 
  2600. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_LIGHT] = InstallColor( RGB(148,154,165) );
  2601. m_mapColorTranslate[_2003CLR_EXPBTN_CIRCLE_DARK] = InstallColor( RGB(99,109,123) );
  2602. m_mapColorTranslate[CLR_TEXT_DISABLED] = InstallColor( RGB(141,141,141) );
  2603. m_mapColorTranslate[COLOR_3DSHADOW] = InstallColor( RGB(141,141,141) );
  2604. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_R] = InstallColor( RGB(115,130,140) );
  2605. m_mapColorTranslate[XPCLR_3DFACE_FLOAT_F] = InstallColor( RGB(115,130,140) );
  2606. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_NORMAL] = InstallColor( m_arrClrComboBoxBorder[0] );
  2607. m_mapColorTranslate[XPCLR_TEXT_FIELD_BORDER_DISABLED] = InstallColor( m_arrClrComboBoxBorder[3] );
  2608. m_mapColorTranslate[_2003CLR_GRADIENT_LIGHT] = 
  2609. m_mapColorTranslate[_2003CLR_GRADIENT_DARK] = InstallColor( RGB(83, 83, 83) );
  2610. }
  2611. #if (!defined __EXT_MFC_NO_RIBBON_BAR)
  2612. CSize CExtPaintManager::Ribbon_GetIconSize(
  2613. const CObject * pHelperSrc,
  2614. INT nILV,
  2615. LPARAM lParam // = 0L
  2616. )
  2617. {
  2618. ASSERT_VALID( this );
  2619. pHelperSrc;
  2620. lParam;
  2621. CSize _size( 16, 16 );
  2622. if( nILV < 0 || nILV == __EXT_RIBBON_ILV_SIMPLE_LARGE )
  2623. _size.cx = _size.cy = 32;
  2624. _size.cx = UiScalingDo( _size.cx, __EUIST_X );
  2625. _size.cy = UiScalingDo( _size.cy, __EUIST_Y );
  2626. return _size;
  2627. }
  2628. INT CExtPaintManager::Ribbon_GetOuterGroupDistance(
  2629. const CExtBarButton * pTBB,
  2630. bool bDistanceBefore,
  2631. LPARAM lParam // = 0L
  2632. )
  2633. {
  2634. ASSERT_VALID( this );
  2635. ASSERT_VALID( pTBB );
  2636. pTBB;
  2637. bDistanceBefore;
  2638. lParam;
  2639. return 1;
  2640. }
  2641. INT CExtPaintManagerOffice2007_R1::Ribbon_GetOuterGroupDistance(
  2642. const CExtBarButton * pTBB,
  2643. bool bDistanceBefore,
  2644. LPARAM lParam // = 0L
  2645. )
  2646. {
  2647. ASSERT_VALID( this );
  2648. ASSERT_VALID( pTBB );
  2649. if( IsHighContrast() )
  2650. return 
  2651. CExtPaintManagerXP::Ribbon_GetOuterGroupDistance(
  2652. pTBB,
  2653. bDistanceBefore,
  2654. lParam
  2655. );
  2656. return 0;
  2657. }
  2658. bool CExtPaintManager::Ribbon_OptionsPageBackgroundIsDefault() const
  2659. {
  2660. ASSERT_VALID( this );
  2661. return false;
  2662. }
  2663. void CExtPaintManager::Ribbon_DwmAreaAdjust(
  2664. CExtRibbonBar * pRibbonBar,
  2665. CExtUxTheme::__EXT_UX_MARGINS & _margins,
  2666. LPARAM lParam // = 0L
  2667. )
  2668. {
  2669. ASSERT_VALID( this );
  2670. ASSERT_VALID( pRibbonBar );
  2671. lParam;
  2672. if( Ribbon_DwmAreaCoversTabs() )
  2673. _margins.cyTopHeight += pRibbonBar->RibbonLayout_GetTabLineHeight();
  2674. }
  2675. bool CExtPaintManager::Ribbon_DwmAreaCoversTabs() const
  2676. {
  2677. ASSERT_VALID( this );
  2678. return false;
  2679. }
  2680. bool CExtPaintManagerOffice2010_Impl::Ribbon_DwmAreaCoversTabs() const
  2681. {
  2682. ASSERT_VALID( this );
  2683. return true;
  2684. }
  2685. INT CExtPaintManager::Ribbon_GetContractedMarginHeight(
  2686. const CExtRibbonPage * pRibbonPage,
  2687. LPARAM lParam // = 0L
  2688. )
  2689. {
  2690. ASSERT_VALID( this );
  2691. pRibbonPage;
  2692. lParam;
  2693. return 0;
  2694. }
  2695. INT CExtPaintManagerOffice2007_Impl::Ribbon_GetContractedMarginHeight(
  2696. const CExtRibbonPage * pRibbonPage,
  2697. LPARAM lParam // = 0L
  2698. )
  2699. {
  2700. ASSERT_VALID( this );
  2701. if( IsHighContrast() )
  2702. return 
  2703. CExtPaintManagerXP::Ribbon_GetContractedMarginHeight(
  2704. pRibbonPage,
  2705. lParam
  2706. );
  2707. return m_nContractedMarginHeight;
  2708. }
  2709. void CExtPaintManager::Ribbon_PaintContractedMargin(
  2710. CDC & dc,
  2711. const CExtRibbonPage * pRibbonPage,
  2712. LPARAM lParam // = 0L
  2713. )
  2714. {
  2715. ASSERT_VALID( this );
  2716. ASSERT( dc.GetSafeHdc() != NULL );
  2717. dc;
  2718. pRibbonPage;
  2719. lParam;
  2720. }
  2721. void CExtPaintManagerOffice2007_Impl::Ribbon_PaintContractedMargin(
  2722. CDC & dc,
  2723. const CExtRibbonPage * pRibbonPage,
  2724. LPARAM lParam // = 0L
  2725. )
  2726. {
  2727. ASSERT_VALID( this );
  2728. ASSERT( dc.GetSafeHdc() != NULL );
  2729. if( IsHighContrast() )
  2730. {
  2731. CExtPaintManagerXP::Ribbon_PaintContractedMargin(
  2732. dc,
  2733. pRibbonPage,
  2734. lParam
  2735. );
  2736. return;
  2737. }
  2738. if( m_clrContractedMargin1 != COLORREF(-1L) )
  2739. {
  2740. CRect rc;
  2741. pRibbonPage->GetClientRect( &rc );
  2742. rc.top = rc.bottom - 1;
  2743. if( dc.RectVisible( &rc ) )
  2744. dc.FillSolidRect( &rc, m_clrContractedMargin1 );
  2745. if( m_clrContractedMargin2 != COLORREF(-1L) )
  2746. {
  2747. rc.OffsetRect( 0, -1 );
  2748. if( dc.RectVisible( &rc ) )
  2749. dc.FillSolidRect( &rc, m_clrContractedMargin2 );
  2750. } // if( m_clrContractedMargin2 != COLORREF(-1L) )
  2751. } // if( m_clrContractedMargin1 != COLORREF(-1L) )
  2752. }
  2753. INT CExtPaintManager::Ribbon_GetGroupHeight(
  2754. const CExtRibbonButtonGroup * pGroupTBB,
  2755. LPARAM lParam // = 0L
  2756. )
  2757. {
  2758. ASSERT_VALID( this );
  2759. lParam;
  2760. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  2761. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  2762. CWindowDC dc( NULL );
  2763. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  2764. TEXTMETRIC _TxtM;
  2765. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  2766. if( ! dc.GetTextMetrics( &_TxtM ) )
  2767. _TxtM.tmHeight = 17;
  2768. dc.SelectObject( pOldFont );
  2769. //  //INT nBasicHeight = 95;
  2770. //  INT nBasicHeight = _TxtM.tmHeight*3 + 56;
  2771. //  INT nRetVal = UiScalingDo( nBasicHeight, __EUIST_Y );
  2772. INT nRetVal = _TxtM.tmHeight*3;
  2773. if( g_PaintManager.m_nLPY > 120 )
  2774. nRetVal += UiScalingDo( 62, __EUIST_Y );
  2775. else
  2776. nRetVal += UiScalingDo( 56, __EUIST_Y );
  2777. if( pGroupTBB != NULL )
  2778. {
  2779. ASSERT_VALID( pGroupTBB );
  2780. const CExtRibbonPage * pRibbonPage = pGroupTBB->GetRibbonPage();
  2781. if( pRibbonPage != NULL )
  2782. {
  2783. ASSERT_VALID( pRibbonPage );
  2784. if( pRibbonPage->m_bHelperPopupMode
  2785. && ( ! pRibbonPage->m_bHelperAutoHideMode )
  2786. && ( ! Ribbon_IsPopupGroupWithCaption( (CObject*)pRibbonPage ) )
  2787. )
  2788. {
  2789. INT nCaptionHeight = Ribbon_GroupCaptionGetHeight( NULL );
  2790. nRetVal -= nCaptionHeight;
  2791. }
  2792. } // if( pRibbonPage != NULL )
  2793. } // if( pGroupTBB != NULL )
  2794. return nRetVal;
  2795. }
  2796. INT CExtPaintManagerNativeXP::Ribbon_GetGroupHeight(
  2797. const CExtRibbonButtonGroup * pGroupTBB,
  2798. LPARAM lParam // = 0L
  2799. )
  2800. {
  2801. ASSERT_VALID( this );
  2802. INT nHeight = CExtPaintManager::Ribbon_GetGroupHeight( pGroupTBB, lParam );
  2803. if( g_PaintManager.m_nLPY > 96 )
  2804. nHeight += 2;
  2805. return nHeight;
  2806. }
  2807. INT CExtPaintManagerOffice2007_Impl::Ribbon_GetGroupHeight(
  2808. const CExtRibbonButtonGroup * pGroupTBB,
  2809. LPARAM lParam // = 0L
  2810. )
  2811. {
  2812. ASSERT_VALID( this );
  2813. if( IsHighContrast() )
  2814. return CExtPaintManagerXP::Ribbon_GetGroupHeight( pGroupTBB, lParam );
  2815. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  2816. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  2817. CWindowDC dc( NULL );
  2818. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  2819. TEXTMETRIC _TxtM;
  2820. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  2821. if( ! dc.GetTextMetrics( &_TxtM ) )
  2822. _TxtM.tmHeight = 17;
  2823. dc.SelectObject( pOldFont );
  2824. //  //INT nBasicHeight = 92;
  2825. //  INT nBasicHeight = _TxtM.tmHeight*3 + 53;
  2826. //  INT nRetVal = UiScalingDo( nBasicHeight, __EUIST_Y );
  2827. INT nRetVal = _TxtM.tmHeight*3;
  2828. if( g_PaintManager.m_nLPY > 120 )
  2829. nRetVal += UiScalingDo( 60, __EUIST_Y );
  2830. else
  2831. nRetVal += UiScalingDo( 54, __EUIST_Y );
  2832. if( pGroupTBB != NULL )
  2833. {
  2834. ASSERT_VALID( pGroupTBB );
  2835. const CExtRibbonPage * pRibbonPage = pGroupTBB->GetRibbonPage();
  2836. if( pRibbonPage != NULL )
  2837. {
  2838. ASSERT_VALID( pRibbonPage );
  2839. if( pRibbonPage->m_bHelperPopupMode
  2840. && ( ! pRibbonPage->m_bHelperAutoHideMode )
  2841. && ( ! Ribbon_IsPopupGroupWithCaption( (CObject*)pRibbonPage ) )
  2842. )
  2843. {
  2844. INT nCaptionHeight = Ribbon_GroupCaptionGetHeight( NULL );
  2845. nRetVal -= nCaptionHeight;
  2846. }
  2847. } // if( pRibbonPage != NULL )
  2848. } // if( pGroupTBB != NULL )
  2849. return nRetVal;
  2850. }
  2851. INT CExtPaintManagerOffice2010_Impl::Ribbon_GetGroupHeight(
  2852. const CExtRibbonButtonGroup * pGroupTBB,
  2853. LPARAM lParam // = 0L
  2854. )
  2855. {
  2856. ASSERT_VALID( this );
  2857. if( IsHighContrast() )
  2858. return CExtPaintManagerXP::Ribbon_GetGroupHeight( pGroupTBB, lParam );
  2859. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  2860. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  2861. CWindowDC dc( NULL );
  2862. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  2863. TEXTMETRIC _TxtM;
  2864. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  2865. if( ! dc.GetTextMetrics( &_TxtM ) )
  2866. _TxtM.tmHeight = 17;
  2867. dc.SelectObject( pOldFont );
  2868. //  //INT nBasicHeight = 92;
  2869. //  INT nBasicHeight = _TxtM.tmHeight*3 + 48;
  2870. //  INT nRetVal = UiScalingDo( nBasicHeight, __EUIST_Y );
  2871. INT nRetVal = _TxtM.tmHeight*3;
  2872. if( g_PaintManager.m_nLPY > 120 )
  2873. nRetVal += UiScalingDo( 48, __EUIST_Y );
  2874. else
  2875. nRetVal += UiScalingDo( 40, __EUIST_Y ) + 8;
  2876. if( pGroupTBB != NULL )
  2877. {
  2878. ASSERT_VALID( pGroupTBB );
  2879. const CExtRibbonPage * pRibbonPage = pGroupTBB->GetRibbonPage();
  2880. if( pRibbonPage != NULL )
  2881. {
  2882. ASSERT_VALID( pRibbonPage );
  2883. if( pRibbonPage->m_bHelperPopupMode
  2884. && ( ! pRibbonPage->m_bHelperAutoHideMode )
  2885. && ( ! Ribbon_IsPopupGroupWithCaption( (CObject*)pRibbonPage ) )
  2886. )
  2887. {
  2888. INT nCaptionHeight = Ribbon_GroupCaptionGetHeight( NULL );
  2889. nRetVal -= nCaptionHeight;
  2890. }
  2891. } // if( pRibbonPage != NULL )
  2892. } // if( pGroupTBB != NULL )
  2893. return nRetVal;
  2894. }
  2895. INT CExtPaintManagerOffice2007_R1::Ribbon_GetGroupHeight(
  2896. const CExtRibbonButtonGroup * pGroupTBB,
  2897. LPARAM lParam // = 0L
  2898. )
  2899. {
  2900. ASSERT_VALID( this );
  2901. if( IsHighContrast() )
  2902. return CExtPaintManagerXP::Ribbon_GetGroupHeight( pGroupTBB, lParam );
  2903. lParam;
  2904. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  2905. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  2906. CWindowDC dc( NULL );
  2907. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  2908. TEXTMETRIC _TxtM;
  2909. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  2910. if( ! dc.GetTextMetrics( &_TxtM ) )
  2911. _TxtM.tmHeight = 17;
  2912. dc.SelectObject( pOldFont );
  2913. //  //INT nBasicHeight = 93;
  2914. //  INT nBasicHeight = _TxtM.tmHeight*3 + 54;
  2915. //  INT nRetVal = UiScalingDo( nBasicHeight, __EUIST_Y );
  2916. INT nRetVal = _TxtM.tmHeight*3;
  2917. if( g_PaintManager.m_nLPY > 120 )
  2918. nRetVal += UiScalingDo( 60, __EUIST_Y );
  2919. else
  2920. nRetVal += UiScalingDo( 54, __EUIST_Y );
  2921. if( pGroupTBB != NULL )
  2922. {
  2923. ASSERT_VALID( pGroupTBB );
  2924. const CExtRibbonPage * pRibbonPage = pGroupTBB->GetRibbonPage();
  2925. if( pRibbonPage != NULL )
  2926. {
  2927. ASSERT_VALID( pRibbonPage );
  2928. if( pRibbonPage->m_bHelperPopupMode
  2929. && ( ! pRibbonPage->m_bHelperAutoHideMode )
  2930. && ( ! Ribbon_IsPopupGroupWithCaption( (CObject*)pRibbonPage ) )
  2931. )
  2932. {
  2933. INT nCaptionHeight = Ribbon_GroupCaptionGetHeight( NULL );
  2934. nRetVal -= nCaptionHeight;
  2935. }
  2936. } // if( pRibbonPage != NULL )
  2937. } // if( pGroupTBB != NULL )
  2938. return nRetVal;
  2939. }
  2940. INT CExtPaintManager::Ribbon_GetToolGroupExtraOffset(
  2941. const CExtRibbonButtonGroup * pGroupTBB,
  2942. LPARAM lParam // = 0L
  2943. )
  2944. {
  2945. ASSERT_VALID( this );
  2946. // ASSERT_VALID( pGroupTBB );
  2947. pGroupTBB;
  2948. lParam;
  2949. return -1;
  2950. }
  2951. INT CExtPaintManagerOffice2007_Impl::Ribbon_GetToolGroupExtraOffset(
  2952. const CExtRibbonButtonGroup * pGroupTBB,
  2953. LPARAM lParam // = 0L
  2954. )
  2955. {
  2956. ASSERT_VALID( this );
  2957. // ASSERT_VALID( pGroupTBB );
  2958. if( IsHighContrast() )
  2959. return 
  2960. CExtPaintManagerXP::Ribbon_GetToolGroupExtraOffset(
  2961. pGroupTBB,
  2962. lParam
  2963. );
  2964. return 0;
  2965. }
  2966. INT CExtPaintManagerOffice2007_R1::Ribbon_GetToolGroupExtraOffset(
  2967. const CExtRibbonButtonGroup * pGroupTBB,
  2968. LPARAM lParam // = 0L
  2969. )
  2970. {
  2971. ASSERT_VALID( this );
  2972. // ASSERT_VALID( pGroupTBB );
  2973. if( IsHighContrast() )
  2974. return 
  2975. CExtPaintManagerXP::Ribbon_GetToolGroupExtraOffset(
  2976. pGroupTBB,
  2977. lParam
  2978. );
  2979. return 0;
  2980. }
  2981. INT CExtPaintManager::Ribbon_GetToolGroupExtraLineDistance(
  2982. const CExtRibbonButtonGroup * pGroupTBB,
  2983. LPARAM lParam // = 0L
  2984. )
  2985. {
  2986. ASSERT_VALID( this );
  2987. // ASSERT_VALID( pGroupTBB );
  2988. pGroupTBB;
  2989. lParam;
  2990. return 1;
  2991. }
  2992. INT CExtPaintManagerOffice2007_Impl::Ribbon_GetToolGroupExtraLineDistance(
  2993. const CExtRibbonButtonGroup * pGroupTBB,
  2994. LPARAM lParam // = 0L
  2995. )
  2996. {
  2997. ASSERT_VALID( this );
  2998. // ASSERT_VALID( pGroupTBB );
  2999. if( IsHighContrast() )
  3000. return 
  3001. CExtPaintManagerXP::Ribbon_GetToolGroupExtraLineDistance(
  3002. pGroupTBB,
  3003. lParam
  3004. );
  3005. return 1;
  3006. }
  3007. INT CExtPaintManagerOffice2007_R1::Ribbon_GetToolGroupExtraLineDistance(
  3008. const CExtRibbonButtonGroup * pGroupTBB,
  3009. LPARAM lParam // = 0L
  3010. )
  3011. {
  3012. ASSERT_VALID( this );
  3013. // ASSERT_VALID( pGroupTBB );
  3014. if( IsHighContrast() )
  3015. return 
  3016. CExtPaintManagerXP::Ribbon_GetToolGroupExtraLineDistance(
  3017. pGroupTBB,
  3018. lParam
  3019. );
  3020. return 0;
  3021. }
  3022. CRect CExtPaintManager::Ribbon_GetContentPadding(
  3023. const CExtBarButton * pTBB,
  3024. LPARAM lParam // = 0L
  3025. )
  3026. {
  3027. ASSERT_VALID( this );
  3028. ASSERT_VALID( pTBB );
  3029. lParam;
  3030. if( pTBB->IsSeparator() )
  3031. return CRect( 1, 1, 1, 1 );
  3032. const CExtRibbonButtonGroup * pGroupTBB = DYNAMIC_DOWNCAST( CExtRibbonButtonGroup, pTBB );
  3033. if( pGroupTBB != NULL )
  3034. {
  3035. if( pGroupTBB->ParentButtonGet() == NULL )
  3036. return CRect( 2, 2, 2, 2 );
  3037. if( pGroupTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
  3038. return CRect( 1, 0, 1, 0 );
  3039. return CRect( 0, 0, 0, 0 );
  3040. }
  3041. if( pTBB->IsKindOf( RUNTIME_CLASS(CExtRibbonButton) )
  3042. || pTBB->IsKindOf( RUNTIME_CLASS(CExtBarColorButton) )
  3043. )
  3044. {
  3045. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3046. if( pParentTBB != NULL )
  3047. {
  3048. if( pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
  3049. return CRect( 0, 0, 0, 0 );
  3050. if( pParentTBB->ParentButtonGet() == NULL )
  3051. return CRect( 2, 0, 2, 0 );
  3052. }
  3053. return CRect( 3, 0, 3, 0 );
  3054. }
  3055. return CRect( 0, 0, 0, 0 );
  3056. }
  3057. CRect CExtPaintManagerOffice2007_R1::Ribbon_GetContentPadding(
  3058. const CExtBarButton * pTBB,
  3059. LPARAM lParam // = 0L
  3060. )
  3061. {
  3062. ASSERT_VALID( this );
  3063. ASSERT_VALID( pTBB );
  3064. if( IsHighContrast() )
  3065. return CExtPaintManagerXP::Ribbon_GetContentPadding( pTBB, lParam );
  3066. if( pTBB->IsSeparator() )
  3067. return CRect( 1, 1, 1, 1 );
  3068. const CExtRibbonButtonGroup * pGroupTBB = DYNAMIC_DOWNCAST( CExtRibbonButtonGroup, pTBB );
  3069. if( pGroupTBB != NULL )
  3070. {
  3071. if( pGroupTBB->ParentButtonGet() == NULL )
  3072. return CRect( 4, 2, 4, 2 );
  3073. if( pGroupTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
  3074. return CRect( 1, 0, 1, 0 );
  3075. return CRect( 0, 0, 0, 0 );
  3076. }
  3077. if( pTBB->IsKindOf( RUNTIME_CLASS(CExtRibbonButton) )
  3078. || pTBB->IsKindOf( RUNTIME_CLASS(CExtBarColorButton) )
  3079. )
  3080. {
  3081. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3082. if( pParentTBB != NULL
  3083. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3084. )
  3085. return CRect( 0, 0, 0, 0 );
  3086. return CRect( 3, 0, 3, 0 );
  3087. }
  3088. return CRect( 0, 0, 0, 0 );
  3089. }
  3090. CRect CExtPaintManagerOffice2010_Impl::Ribbon_GetContentPadding(
  3091. const CExtBarButton * pTBB,
  3092. LPARAM lParam // = 0L
  3093. )
  3094. {
  3095. ASSERT_VALID( this );
  3096. ASSERT_VALID( pTBB );
  3097. lParam;
  3098. if( pTBB->IsSeparator() )
  3099. return CRect( 1, 1, 1, 1 );
  3100. const CExtRibbonButtonGroup * pGroupTBB = DYNAMIC_DOWNCAST( CExtRibbonButtonGroup, pTBB );
  3101. if( pGroupTBB != NULL )
  3102. {
  3103. if( pGroupTBB->ParentButtonGet() == NULL )
  3104. return CRect( 2, 2, 2, 0 );
  3105. if( pGroupTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
  3106. return CRect( 1, 0, 1, 0 );
  3107. return CRect( 0, 0, 0, 0 );
  3108. }
  3109. if( pTBB->IsKindOf( RUNTIME_CLASS(CExtRibbonButton) )
  3110. || pTBB->IsKindOf( RUNTIME_CLASS(CExtBarColorButton) )
  3111. )
  3112. {
  3113. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3114. if( pParentTBB != NULL )
  3115. {
  3116. if( pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) ) )
  3117. return CRect( 0, 0, 0, 0 );
  3118. if( pParentTBB->ParentButtonGet() == NULL )
  3119. return CRect( 2, 0, 2, 0 );
  3120. }
  3121. return CRect( 3, 0, 3, 0 );
  3122. }
  3123. return CRect( 0, 0, 0, 0 );
  3124. }
  3125. CSize CExtPaintManager::Ribbon_GetDropDownArrowSize(
  3126. CDC & dc,
  3127. INT nILV,
  3128. const CExtBarButton * pTBB,
  3129. LPARAM lParam // = 0L
  3130. )
  3131. {
  3132. ASSERT_VALID( this );
  3133. dc;
  3134. nILV;
  3135. pTBB;
  3136. lParam;
  3137. CSize _size( 10, 6 );
  3138. _size.cx = UiScalingDo( _size.cx, __EUIST_X );
  3139. _size.cy = UiScalingDo( _size.cy, __EUIST_Y );
  3140. return _size;
  3141. }
  3142. INT CExtPaintManager::Ribbon_GetTextToIconDistance(
  3143. CDC & dc,
  3144. INT nILV,
  3145. const CExtBarButton * pTBB,
  3146. LPARAM lParam // = 0L
  3147. )
  3148. {
  3149. ASSERT_VALID( this );
  3150. dc;
  3151. pTBB;
  3152. lParam;
  3153. INT nTextToIconDistance = 0;
  3154. if( nILV == __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3155. nTextToIconDistance = UiScalingDo( 1, __EUIST_Y );
  3156. else
  3157. nTextToIconDistance = UiScalingDo( 2, __EUIST_X );
  3158. return nTextToIconDistance;
  3159. }
  3160. CSize CExtPaintManager::Ribbon_CalcButtonSize(
  3161. CDC & dc,
  3162. INT nILV,
  3163. const CExtBarButton * pTBB,
  3164. LPARAM lParam // = 0L
  3165. )
  3166. {
  3167. ASSERT_VALID( this );
  3168. ASSERT_VALID( pTBB );
  3169. if( pTBB->IsSeparator() )
  3170. return CSize( 2, 2 );
  3171. const CExtRibbonNode * pRibbonNode = pTBB->Ribbon_GetNode();
  3172. if( pRibbonNode == NULL )
  3173. return CSize( 0, 0 );
  3174. ASSERT_VALID( pRibbonNode );
  3175. if( nILV < 0 )
  3176. nILV = pTBB->RibbonILV_Get( 0 );
  3177. CSize _sizeIcon = Ribbon_GetIconSize( pTBB, nILV, lParam );
  3178. const CExtCmdIcon * pCmdIcon = pTBB->GetIconPtr();
  3179. bool bHaveIcon = ( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) ) ? true : false;
  3180. CExtSafeString strText;
  3181. if( ! ( nILV == __EXT_RIBBON_ILV_SIMPLE_SMALL && bHaveIcon ) )
  3182. strText = pTBB->GetText();
  3183. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE && pCmdIcon == 0 )
  3184. _sizeIcon.cx = _sizeIcon.cy = 0;
  3185. CSize _sizeText( 0, 0 );
  3186. UINT nDT = 0;
  3187. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3188. {
  3189. strText.Replace( _T("r"), _T(" ") );
  3190. strText.Replace( _T("n"), _T(" ") );
  3191. strText.Replace( _T("t"), _T(" ") );
  3192. strText.Replace( _T("  "), _T(" ") );
  3193. strText.TrimLeft( _T(" ") );
  3194. strText.TrimRight( _T(" ") );
  3195. nDT = DT_SINGLELINE|DT_LEFT|DT_TOP;
  3196. } // if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3197. else
  3198. nDT = DT_LEFT|DT_TOP;
  3199. if( ! strText.IsEmpty() )
  3200. {
  3201. CFont * pFont = ((CExtToolControlBar*)(pTBB->GetBar()))->OnGetToolbarFont( false, true );
  3202. _sizeText = stat_CalcTextDimension( dc, *pFont, strText, nDT|DT_CALCRECT ).Size();
  3203. //  _sizeText.cx = UiScalingDo( _sizeText.cx, __EUIST_X );
  3204. //  _sizeText.cy = UiScalingDo( _sizeText.cy, __EUIST_Y );
  3205. if( _sizeText.cx > 0 )
  3206. _sizeText.cx += 4;
  3207. } // if( ! strText.IsEmpty() )
  3208. CSize _sizeDDA( 0, 0 );
  3209. if( pTBB->IsAbleToTrackMenu() )
  3210. _sizeDDA = Ribbon_GetDropDownArrowSize( dc, nILV, pTBB, lParam );
  3211. CRect rcCP = pTBB->OnRibbonGetContentPadding();
  3212. rcCP.left = UiScalingDo( rcCP.left, __EUIST_X );
  3213. rcCP.top = UiScalingDo( rcCP.top, __EUIST_Y );
  3214. rcCP.right = UiScalingDo( rcCP.right, __EUIST_X );
  3215. rcCP.bottom = UiScalingDo( rcCP.bottom, __EUIST_Y );
  3216. INT nTextToIconDistance = Ribbon_GetTextToIconDistance( dc, nILV, pTBB, lParam );
  3217. CSize _size = _sizeIcon;
  3218. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  3219. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  3220. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  3221. TEXTMETRIC _TxtM;
  3222. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  3223. if( ! dc.GetTextMetrics( &_TxtM ) )
  3224. _TxtM.tmHeight = 17;
  3225. dc.SelectObject( pOldFont );
  3226. INT nBasicHeight = _TxtM.tmHeight;
  3227. if( nILV == __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3228. {
  3229. _sizeText.cx += _sizeDDA.cx;
  3230. if( ! strText.IsEmpty() )
  3231. {
  3232. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3233. _sizeText.cy += nTextToIconDistance;
  3234. }
  3235. _size.cy += _sizeText.cy;
  3236. _size.cx = max( _sizeText.cx, _size.cx );
  3237. _size.cx += rcCP.left + rcCP.right;
  3238. _size.cy += rcCP.top + rcCP.bottom;
  3239. //  CSize _sizeAdjust( 42, 66 );
  3240.  CSize _sizeAdjust( 42, nBasicHeight * 2 + 40 );
  3241. _sizeAdjust.cx = UiScalingDo( _sizeAdjust.cx, __EUIST_X );
  3242. _sizeAdjust.cy = UiScalingDo( _sizeAdjust.cy, __EUIST_Y );
  3243. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3244. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3245. }
  3246. else
  3247. {
  3248. if( ! strText.IsEmpty() )
  3249. {
  3250. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3251. _sizeText.cx += _sizeDDA.cx;
  3252. if( bHaveIcon )
  3253. _sizeText.cx += nTextToIconDistance;
  3254. _size.cx += 4;
  3255. }
  3256. else
  3257. {
  3258. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3259. if( pParentTBB != NULL
  3260. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3261. )
  3262. _size.cx += 8;
  3263. else if(
  3264. pTBB->IsAbleToTrackMenu()
  3265. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButton ) ) )
  3266. )
  3267. _size.cx += 7;
  3268. }
  3269. _size.cx += _sizeText.cx;
  3270. _size.cy = max( _sizeText.cy, _size.cy );
  3271. _size.cx += rcCP.left + rcCP.right;
  3272. _size.cy += rcCP.top + rcCP.bottom;
  3273. if( pTBB->IsAbleToTrackMenu() )
  3274. {
  3275. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3276. bool bInToolGroup =
  3277. ( pParentTBB != NULL
  3278. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3279. ) ? true : false;
  3280. if( bInToolGroup
  3281. || ( nILV < __EXT_RIBBON_ILV_SIMPLE_LARGE
  3282. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonGroup ) ) )
  3283. )
  3284. )
  3285. {
  3286. INT nDropDownButtonWidth = GetDropDownButtonWidth( (CObject*)pTBB, lParam );
  3287. _size.cx += nDropDownButtonWidth;
  3288. }
  3289. }
  3290. //  CSize _sizeAdjust( 22, 22 );
  3291.  CSize _sizeAdjust( nBasicHeight + 6, nBasicHeight + 6 );
  3292.  _sizeAdjust.cx = max( _sizeAdjust.cx, 22 );
  3293.  _sizeAdjust.cy = max( _sizeAdjust.cy, 22 );
  3294. _sizeAdjust.cx = UiScalingDo( _sizeAdjust.cx, __EUIST_X );
  3295. _sizeAdjust.cy = UiScalingDo( _sizeAdjust.cy, __EUIST_Y );
  3296. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3297. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3298. }
  3299. return _size;
  3300. }
  3301. CSize CExtPaintManagerOffice2007_Impl::Ribbon_CalcButtonSize(
  3302. CDC & dc,
  3303. INT nILV,
  3304. const CExtBarButton * pTBB,
  3305. LPARAM lParam // = 0L
  3306. )
  3307. {
  3308. ASSERT_VALID( this );
  3309. ASSERT_VALID( pTBB );
  3310. if( pTBB->IsSeparator() )
  3311. return CSize( 2, 2 );
  3312. const CExtRibbonNode * pRibbonNode = pTBB->Ribbon_GetNode();
  3313. if( pRibbonNode == NULL )
  3314. return CSize( 0, 0 );
  3315. ASSERT_VALID( pRibbonNode );
  3316. if( nILV < 0 )
  3317. nILV = pTBB->RibbonILV_Get( 0 );
  3318. CSize _sizeIcon = Ribbon_GetIconSize( pTBB, nILV, lParam );
  3319. const CExtCmdIcon * pCmdIcon = pTBB->GetIconPtr();
  3320. bool bHaveIcon = ( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) ) ? true : false;
  3321. CExtSafeString strText;
  3322. if( ! ( nILV == __EXT_RIBBON_ILV_SIMPLE_SMALL && bHaveIcon ) )
  3323. strText = pTBB->GetText();
  3324. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE && pCmdIcon == 0 )
  3325. _sizeIcon.cx = _sizeIcon.cy = 0;
  3326. CSize _sizeText( 0, 0 );
  3327. UINT nDT = 0;
  3328. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3329. {
  3330. strText.Replace( _T("r"), _T(" ") );
  3331. strText.Replace( _T("n"), _T(" ") );
  3332. strText.Replace( _T("t"), _T(" ") );
  3333. strText.Replace( _T("  "), _T(" ") );
  3334. strText.TrimLeft( _T(" ") );
  3335. strText.TrimRight( _T(" ") );
  3336. nDT = DT_SINGLELINE|DT_LEFT|DT_TOP;
  3337. } // if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3338. else
  3339. nDT = DT_LEFT|DT_TOP;
  3340. if( ! strText.IsEmpty() )
  3341. {
  3342. CFont * pFont = ((CExtToolControlBar*)(pTBB->GetBar()))->OnGetToolbarFont( false, true );
  3343. _sizeText = stat_CalcTextDimension( dc, *pFont, strText, nDT|DT_CALCRECT ).Size();
  3344. //  _sizeText.cx = UiScalingDo( _sizeText.cx, __EUIST_X );
  3345. //  _sizeText.cy = UiScalingDo( _sizeText.cy, __EUIST_Y );
  3346. if( _sizeText.cx > 0 )
  3347. _sizeText.cx += 4;
  3348. } // if( ! strText.IsEmpty() )
  3349. CSize _sizeDDA( 0, 0 );
  3350. if( pTBB->IsAbleToTrackMenu() )
  3351. _sizeDDA = Ribbon_GetDropDownArrowSize( dc, nILV, pTBB, lParam );
  3352. CRect rcCP = pTBB->OnRibbonGetContentPadding();
  3353. //  rcCP.left = UiScalingDo( rcCP.left, __EUIST_X );
  3354. //  rcCP.top = UiScalingDo( rcCP.top, __EUIST_Y );
  3355. //  rcCP.right = UiScalingDo( rcCP.right, __EUIST_X );
  3356. //  rcCP.bottom = UiScalingDo( rcCP.bottom, __EUIST_Y );
  3357. INT nTextToIconDistance = Ribbon_GetTextToIconDistance( dc, nILV, pTBB, lParam );
  3358. CSize _size = _sizeIcon;
  3359. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  3360. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  3361. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  3362. TEXTMETRIC _TxtM;
  3363. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  3364. if( ! dc.GetTextMetrics( &_TxtM ) )
  3365. _TxtM.tmHeight = 17;
  3366. dc.SelectObject( pOldFont );
  3367. INT nBasicHeight = _TxtM.tmHeight;
  3368. if( nILV == __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3369. {
  3370. _sizeText.cx += _sizeDDA.cx;
  3371. if( ! strText.IsEmpty() )
  3372. {
  3373. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3374. _sizeText.cy += nTextToIconDistance;
  3375. }
  3376. _size.cy += _sizeText.cy;
  3377. _size.cx = max( _sizeText.cx, _size.cx );
  3378. _size.cx += rcCP.left + rcCP.right;
  3379. _size.cy += rcCP.top + rcCP.bottom;
  3380. //  CSize _sizeAdjust( 42, 66 );
  3381.  CSize _sizeAdjust(
  3382.  UiScalingDo( 42, __EUIST_X ),
  3383.  nBasicHeight * 2 + UiScalingDo( 40, __EUIST_Y )
  3384.  );
  3385. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3386. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3387. }
  3388. else
  3389. {
  3390. if( ! strText.IsEmpty() )
  3391. {
  3392. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3393. _sizeText.cx += _sizeDDA.cx;
  3394. if( bHaveIcon )
  3395. _sizeText.cx += nTextToIconDistance;
  3396. _size.cx += 4;
  3397. }
  3398. else
  3399. {
  3400. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3401. if( pParentTBB != NULL
  3402. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3403. )
  3404. _size.cx += 8;
  3405. else if(
  3406. pTBB->IsAbleToTrackMenu()
  3407. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButton ) ) )
  3408. )
  3409. _size.cx += 7;
  3410. }
  3411. _size.cx += _sizeText.cx;
  3412. _size.cy = max( _sizeText.cy, _size.cy );
  3413. _size.cx += rcCP.left + rcCP.right;
  3414. _size.cy += rcCP.top + rcCP.bottom;
  3415. if( pTBB->IsAbleToTrackMenu() )
  3416. {
  3417. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3418. bool bInToolGroup =
  3419. ( pParentTBB != NULL
  3420. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3421. ) ? true : false;
  3422. if( bInToolGroup
  3423. || ( nILV < __EXT_RIBBON_ILV_SIMPLE_LARGE
  3424. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonGroup ) ) )
  3425. )
  3426. )
  3427. {
  3428. INT nDropDownButtonWidth = GetDropDownButtonWidth( (CObject*)pTBB, lParam );
  3429. _size.cx += nDropDownButtonWidth;
  3430. }
  3431. }
  3432. //  CSize _sizeAdjust( 22, 22 );
  3433.  CSize _sizeAdjust( nBasicHeight + 6, nBasicHeight + 6 );
  3434.  if( g_PaintManager.m_bIsWinVistaOrLater && g_PaintManager.m_nLPY <= 96 )
  3435.  {
  3436.  _sizeAdjust.cx = max( _sizeAdjust.cx, 22 );
  3437.  _sizeAdjust.cy = max( _sizeAdjust.cy, 22 );
  3438.  }
  3439. _sizeAdjust.cx = UiScalingDo( _sizeAdjust.cx, __EUIST_X );
  3440. _sizeAdjust.cy = UiScalingDo( _sizeAdjust.cy, __EUIST_Y );
  3441. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3442. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3443. }
  3444. return _size;
  3445. }
  3446. CSize CExtPaintManagerOffice2007_R1::Ribbon_CalcButtonSize(
  3447. CDC & dc,
  3448. INT nILV,
  3449. const CExtBarButton * pTBB,
  3450. LPARAM lParam // = 0L
  3451. )
  3452. {
  3453. ASSERT_VALID( this );
  3454. ASSERT_VALID( pTBB );
  3455. return CExtPaintManagerOffice2003::Ribbon_CalcButtonSize( dc, nILV, pTBB, lParam );
  3456. }
  3457. CSize CExtPaintManagerOffice2010_Impl::Ribbon_CalcButtonSize(
  3458. CDC & dc,
  3459. INT nILV,
  3460. const CExtBarButton * pTBB,
  3461. LPARAM lParam // = 0L
  3462. )
  3463. {
  3464. ASSERT_VALID( this );
  3465. ASSERT_VALID( pTBB );
  3466. if( pTBB->IsSeparator() )
  3467. return CSize( 2, 2 );
  3468. const CExtRibbonNode * pRibbonNode = pTBB->Ribbon_GetNode();
  3469. if( pRibbonNode == NULL )
  3470. return CSize( 0, 0 );
  3471. ASSERT_VALID( pRibbonNode );
  3472. if( nILV < 0 )
  3473. nILV = pTBB->RibbonILV_Get( 0 );
  3474. CSize _sizeIcon = Ribbon_GetIconSize( pTBB, nILV, lParam );
  3475. const CExtCmdIcon * pCmdIcon = pTBB->GetIconPtr();
  3476. bool bHaveIcon = ( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) ) ? true : false;
  3477. CExtSafeString strText;
  3478. if( ! ( nILV == __EXT_RIBBON_ILV_SIMPLE_SMALL && bHaveIcon ) )
  3479. strText = pTBB->GetText();
  3480. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE && pCmdIcon == 0 )
  3481. _sizeIcon.cx = _sizeIcon.cy = 0;
  3482. CSize _sizeText( 0, 0 );
  3483. UINT nDT = 0;
  3484. if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3485. {
  3486. strText.Replace( _T("r"), _T(" ") );
  3487. strText.Replace( _T("n"), _T(" ") );
  3488. strText.Replace( _T("t"), _T(" ") );
  3489. strText.Replace( _T("  "), _T(" ") );
  3490. strText.TrimLeft( _T(" ") );
  3491. strText.TrimRight( _T(" ") );
  3492. nDT = DT_SINGLELINE|DT_LEFT|DT_TOP;
  3493. } // if( nILV != __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3494. else
  3495. nDT = DT_LEFT|DT_TOP;
  3496. if( ! strText.IsEmpty() )
  3497. {
  3498. CFont * pFont = ((CExtToolControlBar*)(pTBB->GetBar()))->OnGetToolbarFont( false, true );
  3499. _sizeText = stat_CalcTextDimension( dc, *pFont, strText, nDT|DT_CALCRECT ).Size();
  3500. //  _sizeText.cx = UiScalingDo( _sizeText.cx, __EUIST_X );
  3501. //  _sizeText.cy = UiScalingDo( _sizeText.cy, __EUIST_Y );
  3502. if( _sizeText.cx > 0 )
  3503. _sizeText.cx += 4;
  3504. } // if( ! strText.IsEmpty() )
  3505. CSize _sizeDDA( 0, 0 );
  3506. if( pTBB->IsAbleToTrackMenu() )
  3507. _sizeDDA = Ribbon_GetDropDownArrowSize( dc, nILV, pTBB, lParam );
  3508. CRect rcCP = pTBB->OnRibbonGetContentPadding();
  3509. rcCP.left = UiScalingDo( rcCP.left, __EUIST_X );
  3510. rcCP.top = UiScalingDo( rcCP.top, __EUIST_Y );
  3511. rcCP.right = UiScalingDo( rcCP.right, __EUIST_X );
  3512. rcCP.bottom = UiScalingDo( rcCP.bottom, __EUIST_Y );
  3513. INT nTextToIconDistance = Ribbon_GetTextToIconDistance( dc, nILV, pTBB, lParam );
  3514. CSize _size = _sizeIcon;
  3515. CFont * pMeasureFont = (CFont*)&m_FontRibbonNormal;
  3516. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  3517. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  3518. TEXTMETRIC _TxtM;
  3519. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  3520. if( ! dc.GetTextMetrics( &_TxtM ) )
  3521. _TxtM.tmHeight = 17;
  3522. dc.SelectObject( pOldFont );
  3523. INT nBasicHeight = _TxtM.tmHeight;
  3524. if( nILV == __EXT_RIBBON_ILV_SIMPLE_LARGE )
  3525. {
  3526. _sizeText.cx += _sizeDDA.cx;
  3527. if( ! strText.IsEmpty() )
  3528. {
  3529. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3530. _sizeText.cy += nTextToIconDistance;
  3531. }
  3532. _size.cy += _sizeText.cy;
  3533. _size.cx = max( _sizeText.cx, _size.cx );
  3534. _size.cx += rcCP.left + rcCP.right;
  3535. _size.cy += rcCP.top + rcCP.bottom;
  3536. //  CSize _sizeAdjust( 42, 66 );
  3537.  CSize _sizeAdjust(
  3538.  UiScalingDo( 42, __EUIST_X ),
  3539.  nBasicHeight * 2 + UiScalingDo( 40, __EUIST_Y )
  3540.  );
  3541. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3542. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3543. }
  3544. else
  3545. {
  3546. if( ! strText.IsEmpty() )
  3547. {
  3548. _sizeText.cy = max( _sizeText.cy, _sizeDDA.cy );
  3549. _sizeText.cx += _sizeDDA.cx;
  3550. if( bHaveIcon )
  3551. _sizeText.cx += nTextToIconDistance;
  3552. _size.cx += 4;
  3553. }
  3554. else
  3555. {
  3556. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3557. if( pParentTBB != NULL
  3558. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3559. )
  3560. _size.cx += 8;
  3561. else if(
  3562. pTBB->IsAbleToTrackMenu()
  3563. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButton ) ) )
  3564. )
  3565. _size.cx += 7;
  3566. }
  3567. _size.cx += _sizeText.cx;
  3568. _size.cy = max( _sizeText.cy, _size.cy );
  3569. _size.cx += rcCP.left + rcCP.right;
  3570. _size.cy += rcCP.top + rcCP.bottom;
  3571. if( pTBB->IsAbleToTrackMenu() )
  3572. {
  3573. const CExtBarButton * pParentTBB = pTBB->ParentButtonGet();
  3574. bool bInToolGroup =
  3575. ( pParentTBB != NULL
  3576. && pParentTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonToolGroup ) )
  3577. ) ? true : false;
  3578. if( bInToolGroup
  3579. || ( nILV < __EXT_RIBBON_ILV_SIMPLE_LARGE
  3580. && (! pTBB->IsKindOf( RUNTIME_CLASS( CExtRibbonButtonGroup ) ) )
  3581. )
  3582. )
  3583. {
  3584. INT nDropDownButtonWidth = GetDropDownButtonWidth( (CObject*)pTBB, lParam );
  3585. _size.cx += nDropDownButtonWidth;
  3586. }
  3587. }
  3588. //  CSize _sizeAdjust( 22, 22 );
  3589.  CSize _sizeAdjust( nBasicHeight + 6, nBasicHeight + 6 );
  3590.  _sizeAdjust.cx = max( _sizeAdjust.cx, 22 );
  3591.  _sizeAdjust.cy = max( _sizeAdjust.cy, 22 );
  3592. //  _sizeAdjust.cx = UiScalingDo( _sizeAdjust.cx, __EUIST_X );
  3593. //  _sizeAdjust.cy = UiScalingDo( _sizeAdjust.cy, __EUIST_Y );
  3594. _size.cx = max( _size.cx, _sizeAdjust.cx );
  3595. _size.cy = max( _size.cy, _sizeAdjust.cy );
  3596. }
  3597. return _size;
  3598. }
  3599. bool CExtPaintManager::Ribbon_GroupCaptionIsAtTop(
  3600. const CExtRibbonButtonGroup * pGroupTBB,
  3601. LPARAM lParam // = 0L
  3602. ) const
  3603. {
  3604. ASSERT_VALID( this );
  3605. pGroupTBB;
  3606. lParam;
  3607. return true;
  3608. }
  3609. bool CExtPaintManagerOffice2007_Impl::Ribbon_GroupCaptionIsAtTop(
  3610. const CExtRibbonButtonGroup * pGroupTBB,
  3611. LPARAM lParam // = 0L
  3612. ) const
  3613. {
  3614. ASSERT_VALID( this );
  3615. if( IsHighContrast() )
  3616. return 
  3617. CExtPaintManagerXP::Ribbon_GroupCaptionIsAtTop(
  3618. pGroupTBB,
  3619. lParam
  3620. );
  3621. return m_bRibbonGroupCaptionAtTop;
  3622. }
  3623. INT CExtPaintManager::Ribbon_GroupCaptionGetHeight(
  3624. const CExtRibbonButtonGroup * pGroupTBB,
  3625. LPARAM lParam // = 0L
  3626. ) const
  3627. {
  3628. ASSERT_VALID( this );
  3629. lParam;
  3630. if( pGroupTBB != NULL )
  3631. {
  3632. ASSERT_VALID( pGroupTBB );
  3633. const CExtRibbonPage * pRibbonPage = pGroupTBB->GetRibbonPage();
  3634. if( pRibbonPage != NULL )
  3635. {
  3636. ASSERT_VALID( pRibbonPage );
  3637. if( pRibbonPage->m_bHelperPopupMode
  3638. && ( ! pRibbonPage->m_bHelperAutoHideMode )
  3639. && ( ! Ribbon_IsPopupGroupWithCaption( (CObject*)pRibbonPage ) )
  3640. )
  3641. return 0;
  3642. } // if( pRibbonPage != NULL )
  3643. } // if( pGroupTBB != NULL )
  3644. CFont * pMeasureFont = (CFont*)&m_FontRibbonGroupCaption;
  3645. ASSERT( pMeasureFont->GetSafeHandle() != NULL );
  3646. CWindowDC dc( NULL );
  3647. CFont * pOldFont = dc.SelectObject( pMeasureFont );
  3648. TEXTMETRIC _TxtM;
  3649. ::memset( &_TxtM, 0, sizeof(TEXTMETRIC) );
  3650. if( ! dc.GetTextMetrics( &_TxtM ) )
  3651. _TxtM.tmHeight = 17;
  3652. dc.SelectObject( pOldFont );
  3653. INT nCaptionHeight = _TxtM.tmHeight;
  3654. nCaptionHeight = UiScalingDo( nCaptionHeight, __EUIST_Y );
  3655. if( g_PaintManager.m_nLPY <= 96 )
  3656. nCaptionHeight += 5;
  3657. return nCaptionHeight;
  3658. }
  3659. INT CExtPaintManagerOffice2007_Impl::Ribbon_GroupCaptionGetHeight(
  3660. const CExtRibbonButtonGroup * pGroupTBB,
  3661. LPARAM lParam // = 0L
  3662. ) const
  3663. {
  3664. ASSERT_VALID( this );
  3665. if( IsHighContrast() )
  3666. return CExtPaintManagerXP::Ribbon_GroupCaptionGetHeight( pGroupTBB, lParam );
  3667. return CExtPaintManagerOffice2003::Ribbon_GroupCaptionGetHeight( pGroupTBB, lParam );
  3668. }
  3669. CExtCmdIcon * CExtPaintManager::Ribbon_GetGroupCollapsedIcon(
  3670. const CExtRibbonButtonGroup * pGroupTBB,
  3671. LPARAM lParam // = 0L
  3672. )
  3673. {
  3674. ASSERT_VALID( this );
  3675. lParam;
  3676. if( pGroupTBB == NULL )
  3677. return NULL;
  3678. ASSERT_VALID( pGroupTBB );
  3679. CExtRibbonNode * pRibbonNode = (CExtRibbonNode *)pGroupTBB->Ribbon_GetNode();
  3680. if( pRibbonNode == NULL )
  3681. return NULL;
  3682. ASSERT_VALID( pRibbonNode );
  3683. if( ! pRibbonNode->m_iconBig.IsEmpty() )
  3684. return (& pRibbonNode->m_iconBig );
  3685. if( ! pRibbonNode->m_iconSmall.IsEmpty() )
  3686. {
  3687. CSize _size = Ribbon_GetIconSize( pGroupTBB, __EXT_RIBBON_ILV_SIMPLE_LARGE );
  3688. pRibbonNode->m_iconBig = pRibbonNode->m_iconSmall;
  3689. pRibbonNode->m_iconBig.Scale( _size );
  3690. return (& pRibbonNode->m_iconBig );
  3691. }
  3692. return NULL;
  3693. }
  3694. CExtCmdIcon * CExtPaintManagerOffice2007_Impl::Ribbon_GetGroupCollapsedIcon(
  3695. const CExtRibbonButtonGroup * pGroupTBB,
  3696. LPARAM lParam // = 0L
  3697. )
  3698. {
  3699. ASSERT_VALID( this );
  3700. if( IsHighContrast() )
  3701. return 
  3702. CExtPaintManagerXP::Ribbon_GetGroupCollapsedIcon(
  3703. pGroupTBB,
  3704. lParam
  3705. );
  3706. if( pGroupTBB == NULL )
  3707. return NULL;
  3708. ASSERT_VALID( pGroupTBB );
  3709. CExtRibbonNode * pRibbonNode = (CExtRibbonNode *)pGroupTBB->Ribbon_GetNode();
  3710. if( pRibbonNode == NULL )
  3711. return NULL;
  3712. ASSERT_VALID( pRibbonNode );
  3713. if( ! pRibbonNode->m_iconSmall.IsEmpty() )
  3714. return (& pRibbonNode->m_iconSmall );
  3715. if( ! pRibbonNode->m_iconBig.IsEmpty() )
  3716. {
  3717. CSize _sizeSmall = Ribbon_GetIconSize( pGroupTBB, __EXT_RIBBON_ILV_SIMPLE_SMALL );
  3718. pRibbonNode->m_iconSmall = pRibbonNode->m_iconBig;
  3719. pRibbonNode->m_iconSmall.Scale( _sizeSmall );
  3720. return (& pRibbonNode->m_iconSmall );
  3721. }
  3722. return NULL;
  3723. }
  3724. CExtCmdIcon * CExtPaintManagerOffice2007_R1::Ribbon_GetGroupCollapsedIcon(
  3725. const CExtRibbonButtonGroup * pGroupTBB,
  3726. LPARAM lParam // = 0L
  3727. )
  3728. {
  3729. ASSERT_VALID( this );
  3730. if( IsHighContrast() )
  3731. return 
  3732. CExtPaintManagerXP::Ribbon_GetGroupCollapsedIcon(
  3733. pGroupTBB,
  3734. lParam
  3735. );
  3736. CExtCmdIcon * pCmdIcon = CExtPaintManager::Ribbon_GetGroupCollapsedIcon( pGroupTBB, lParam );
  3737. if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
  3738. pCmdIcon->Scale( CSize( 32, 32 ) );
  3739. return pCmdIcon;
  3740. }
  3741. void CExtPaintManager::Ribbon_PaintText(
  3742. CDC & dc,
  3743. __EXT_MFC_SAFE_LPCTSTR strText,
  3744. const RECT & rcText,
  3745. UINT nDrawTextFlags,
  3746. bool bDrawDropDownArrow,
  3747. CExtBitmap * pBmpAlternativeDropDownArrow,
  3748. CObject * pHelperSrc,
  3749. LPARAM lParam // = 0L
  3750. )
  3751. {
  3752. ASSERT_VALID( this );
  3753. ASSERT( dc.GetSafeHdc() != NULL );
  3754. pHelperSrc;
  3755. lParam;
  3756. CExtSafeString strCaptionText = ( strText == NULL ) ? _T("") : strText;
  3757. strCaptionText.TrimLeft( _T(" rt") );
  3758. strCaptionText.TrimRight( _T(" rt") );
  3759. CExtSafeStringArray strArray;
  3760. INT nPartIndex, nPartCount, nMeasuredTextHeight = 0;
  3761. if( ! strCaptionText.IsEmpty() )
  3762. {
  3763. nPartCount = 2;
  3764. for( nPartIndex = 0; nPartIndex < nPartCount; nPartIndex ++ )
  3765. {
  3766. INT nSepPos = strCaptionText.Find( 'n' );
  3767. if( nSepPos >= 0 )
  3768. {
  3769. CExtSafeString s = strCaptionText.Left( nSepPos );
  3770. s.TrimLeft( _T(" rt") );
  3771. s.TrimRight( _T(" rt") );
  3772. if( ! s.IsEmpty() )
  3773. {
  3774. strArray.Add( s );
  3775. CRect rcCalc( 0, 0, 0, 0 );
  3776. dc.DrawText(
  3777. LPCTSTR(s),
  3778. INT( _tcslen( LPCTSTR(s) ) ),
  3779. rcCalc,
  3780. DT_SINGLELINE|DT_LEFT|DT_TOP|DT_CALCRECT
  3781. );
  3782. nMeasuredTextHeight += rcCalc.Height();
  3783. }
  3784. INT nRightPartSize =
  3785. strCaptionText.GetLength() - nSepPos - 1;
  3786. ASSERT( nRightPartSize >= 0 );
  3787. if( nRightPartSize == 0 )
  3788. break;
  3789. strCaptionText = strCaptionText.Right( nRightPartSize );
  3790. strCaptionText.TrimLeft( _T(" rt") );
  3791. strCaptionText.TrimRight( _T(" rt") );
  3792. if( strCaptionText.IsEmpty() )
  3793. break;
  3794. } // if( nSepPos >= 0 )
  3795. else
  3796. {
  3797. strArray.Add( strCaptionText );
  3798. CRect rcCalc( 0, 0, 0, 0 );
  3799. dc.DrawText(
  3800. LPCTSTR(strCaptionText),
  3801. INT( _tcslen( LPCTSTR(strCaptionText) ) ),
  3802. rcCalc,
  3803. DT_SINGLELINE|DT_LEFT|DT_TOP|DT_CALCRECT
  3804. );
  3805. nMeasuredTextHeight += rcCalc.Height();
  3806. break;
  3807. } // else from if( nSepPos >= 0 )
  3808. } // for( nPartIndex = 0; nPartIndex < nPartCount; nPartIndex ++ )
  3809. } // if( ! strCaptionText.IsEmpty() )
  3810. nPartCount = INT( strArray.GetSize() );
  3811. static const POINT g_ptArrDist = { 2, 4 };
  3812. CPoint ptArrow( 0, 0 );
  3813. CSize _sizeArrow( 0, 0 );
  3814. glyph_t * pGlyph = g_DockingCaptionGlyphs[ __DCBT_ARROW_DOWN ];
  3815. if( bDrawDropDownArrow )
  3816. {
  3817. if( pBmpAlternativeDropDownArrow != NULL
  3818. && (! pBmpAlternativeDropDownArrow->IsEmpty() )
  3819. )
  3820. _sizeArrow = pBmpAlternativeDropDownArrow->GetSize();
  3821. else
  3822. _sizeArrow = pGlyph->Size();
  3823. } // if( bDrawDropDownArrow )
  3824. CRect rcWalk = rcText;
  3825. if( nPartCount <= 1
  3826. && pHelperSrc != NULL
  3827. && pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtBarButton ) )
  3828. && ((CExtBarButton*)pHelperSrc)->RibbonILV_Get() < __EXT_RIBBON_ILV_SIMPLE_LARGE
  3829. )
  3830. {
  3831. CRect rcDraw = rcText;
  3832. CRect rcArrow = rcDraw;
  3833. if( nPartCount == 1 || bDrawDropDownArrow )
  3834. {
  3835. if( _sizeArrow.cx > 0
  3836. && _sizeArrow.cy > 0
  3837. )
  3838. {
  3839. rcDraw.right -= _sizeArrow.cx;
  3840. rcArrow.left = rcDraw.right;
  3841. if( pBmpAlternativeDropDownArrow != NULL
  3842. && (! pBmpAlternativeDropDownArrow->IsEmpty() )
  3843. )
  3844. {
  3845. rcArrow.left += ( rcArrow.Width() - _sizeArrow.cx ) / 2;
  3846. rcArrow.top  += ( rcArrow.Height() - _sizeArrow.cy ) / 2;
  3847. rcArrow.right = rcArrow.left + _sizeArrow.cx;
  3848. rcArrow.bottom = rcArrow.top + _sizeArrow.cy;
  3849. if( nPartCount == 0 )
  3850. rcArrow.OffsetRect( 0, 1 );
  3851. // rcArrow.OffsetRect(
  3852. //  0, 
  3853. //  ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2
  3854. //  );
  3855. pBmpAlternativeDropDownArrow->AlphaBlend( dc.m_hDC, rcArrow );
  3856. }
  3857. else
  3858. {
  3859. ptArrow.y -= 4;
  3860. COLORREF ColorValues1[2] =
  3861. {
  3862. RGB(0,0,0),
  3863. GetColor(COLOR_3DHILIGHT),
  3864. };
  3865. COLORREF ColorValues2[2] =
  3866. {
  3867. RGB(0,0,0),
  3868. GetColor(COLOR_BTNTEXT),
  3869. };
  3870. if( nPartCount == 0 )
  3871. {
  3872. ptArrow.x += 3;
  3873. ptArrow.y ++;
  3874. }
  3875. // ptArrow.y += ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2;
  3876. ptArrow.y ++;
  3877. PaintGlyphCentered( dc, rcArrow, *pGlyph, ColorValues1 );
  3878. ptArrow.y --;
  3879. PaintGlyphCentered( dc, rcArrow, *pGlyph, ColorValues2 );
  3880. }
  3881. }
  3882. }
  3883. if( nPartCount == 1 )
  3884. {
  3885. CExtSafeString & s = strArray.ElementAt( 0 );
  3886. INT nLen = s.GetLength();
  3887. ASSERT( nLen > 0 );
  3888. // rcDraw.OffsetRect(
  3889. //  0, 
  3890. //  ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2
  3891. //  );
  3892. dc.DrawText( LPCTSTR(s), nLen, rcDraw, nDrawTextFlags );
  3893. }
  3894. }
  3895. else
  3896. {
  3897. nDrawTextFlags &= ~(DT_SINGLELINE);
  3898. for( nPartIndex = 0; nPartIndex < nPartCount; nPartIndex ++ )
  3899. {
  3900. CExtSafeString & s = strArray.ElementAt( nPartIndex );
  3901. INT nLen = s.GetLength();
  3902. ASSERT( nLen > 0 );
  3903. CRect rcCalc( 0, 0, 0, 0 );
  3904. dc.DrawText( LPCTSTR(s), nLen, rcCalc, DT_SINGLELINE|DT_LEFT|DT_TOP|DT_CALCRECT );
  3905. INT nTextHeight = rcCalc.Height();
  3906. rcWalk.bottom = rcWalk.top + nTextHeight;
  3907. CRect rcDraw = rcWalk;
  3908. if( _sizeArrow.cx > 0
  3909. && _sizeArrow.cy > 0
  3910. && nPartCount > 1
  3911. && nPartIndex == ( nPartCount - 1 )
  3912. )
  3913. {
  3914. if( ( nDrawTextFlags & DT_CENTER ) != 0 )
  3915. {
  3916. INT nTextWidth = rcCalc.Width();
  3917. rcDraw.left += ( rcWalk.Width() - nTextWidth - _sizeArrow.cx - g_ptArrDist.x ) / 2;
  3918. rcDraw.right = rcDraw.left + nTextWidth;
  3919. } // if( ( nDrawTextFlags & DT_CENTER ) != 0 )
  3920. ptArrow.x = rcDraw.right + g_ptArrDist.x;
  3921. ptArrow.y = rcWalk.top + ( nTextHeight - _sizeArrow.cy ) / 2;
  3922. }
  3923. // rcDraw.OffsetRect(
  3924. //  0, 
  3925. //  ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2
  3926. //  );
  3927. dc.DrawText( LPCTSTR(s), nLen, rcDraw, nDrawTextFlags );
  3928. rcWalk.OffsetRect( 0, nTextHeight );
  3929. } // for( nPartIndex = 0; nPartIndex < nPartCount; nPartIndex ++ )
  3930. if( _sizeArrow.cx > 0
  3931. && _sizeArrow.cy > 0
  3932. )
  3933. {
  3934. if( nPartCount <= 1 )
  3935. {
  3936. ptArrow.x = rcWalk.left + ( rcWalk.Width() - _sizeArrow.cx ) / 2;
  3937. ptArrow.y = rcWalk.top + g_ptArrDist.y;
  3938. }
  3939. if( pBmpAlternativeDropDownArrow != NULL
  3940. && (! pBmpAlternativeDropDownArrow->IsEmpty() )
  3941. )
  3942. {
  3943. CRect rcArrow( ptArrow, _sizeArrow );
  3944. // rcArrow.OffsetRect(
  3945. //  0, 
  3946. //  ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2
  3947. //  );
  3948. pBmpAlternativeDropDownArrow->AlphaBlend( dc.m_hDC, rcArrow );
  3949. }
  3950. else
  3951. {
  3952. ptArrow.y -= 4;
  3953. COLORREF ColorValues1[2] =
  3954. {
  3955. RGB(0,0,0),
  3956. GetColor(COLOR_3DHILIGHT),
  3957. };
  3958. COLORREF ColorValues2[2] =
  3959. {
  3960. RGB(0,0,0),
  3961. GetColor(COLOR_BTNTEXT),
  3962. };
  3963. // ptArrow.y += ( rcText.bottom - rcText.top - nMeasuredTextHeight ) / 2;
  3964. ptArrow.y ++;
  3965. PaintGlyph( dc, ptArrow, *pGlyph, ColorValues1 );
  3966. ptArrow.y --;
  3967. PaintGlyph( dc, ptArrow, *pGlyph, ColorValues2 );
  3968. }
  3969. }
  3970. }
  3971. }
  3972. void CExtPaintManagerOffice2007_Impl::Ribbon_PaintText(
  3973. CDC & dc,
  3974. __EXT_MFC_SAFE_LPCTSTR strText,
  3975. const RECT & rcText,
  3976. UINT nDrawTextFlags,
  3977. bool bDrawDropDownArrow,
  3978. CExtBitmap * pBmpAlternativeDropDownArrow,
  3979. CObject * pHelperSrc,
  3980. LPARAM lParam // = 0L
  3981. )
  3982. {
  3983. ASSERT_VALID( this );
  3984. ASSERT( dc.GetSafeHdc() != NULL );
  3985. if( IsHighContrast() )
  3986. {
  3987. CExtPaintManagerXP::Ribbon_PaintText(
  3988. dc,
  3989. strText,
  3990. rcText,
  3991. nDrawTextFlags,
  3992. bDrawDropDownArrow,
  3993. pBmpAlternativeDropDownArrow,
  3994. pHelperSrc,
  3995. lParam
  3996. );
  3997. return;
  3998. }
  3999. if( bDrawDropDownArrow
  4000. && ( pBmpAlternativeDropDownArrow == NULL
  4001. || pBmpAlternativeDropDownArrow->IsEmpty()
  4002. )
  4003. )
  4004. pBmpAlternativeDropDownArrow = &m_bmpRibbonDDA;
  4005. CExtPaintManager::Ribbon_PaintText(
  4006. dc,
  4007. strText,
  4008. rcText,
  4009. nDrawTextFlags,
  4010. bDrawDropDownArrow,
  4011. pBmpAlternativeDropDownArrow,
  4012. pHelperSrc,
  4013. lParam
  4014. );
  4015. }
  4016. bool CExtPaintManager::Ribbon_PaintQuickAccessGroupButton(
  4017. CDC & dc,
  4018. const RECT & rcGroupBk,
  4019. const CExtRibbonButtonGroup * pGroupTBB,
  4020. LPARAM lParam // = 0L
  4021. )
  4022. {
  4023. ASSERT_VALID( this );
  4024. ASSERT( dc.GetSafeHdc() != NULL );
  4025. dc;
  4026. rcGroupBk;
  4027. pGroupTBB;
  4028. lParam;
  4029. return false;
  4030. }
  4031. bool CExtPaintManagerOffice2007_Impl::Ribbon_PaintQuickAccessGroupButton(