Office 2013 Theme - Shadow |
Post Reply |
Author | |||
mihey
Groupie Joined: 14 May 2003 Location: Germany Status: Offline Points: 45 |
Post Options
Thanks(0)
Posted: 05 December 2016 at 7:45am |
||
Hi,
comparing two examples - Ribbon.RibbonControls and Ribbon.RibonSample from the new XTP 17.3 MFC, I found out that the first one shows a shadow around the main window and the second one doesn't. vs Both are executed in Windows 7 x64 OS. Can anybody say which exactly method is responsible for this? I could not find it yet. My application also does not show the shadow at the moment and I'd like to change it. Regards, Mikhail. |
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
||
Hello Mikhail,
FrameShadows are turned on with calling CXTPCommandBarsFrameHook::EnableFrameTheme(). Differences between these two samples in methods CMainFrame::SetCommandBarsTheme(). > ToolkitPro1800UD.dll!CXTPCommandBarsFrameHook::EnableShadow() Line 1387 C++ ToolkitPro1800UD.dll!CXTPCommandBarsFrameHook::EnableFrameTheme(CXTPCommandBars * pCommandBars) Line 383 C++ ToolkitPro1800UD.dll!CXTPCommandBarsFrameHook::EnableOffice2007Frame(CXTPCommandBars * pCommandBars) Line 404 C++ ToolkitPro1800UD.dll!CXTPCommandBars::EnableFrameTheme(int bEnable) Line 2341 C++ ToolkitPro1800UD.dll!CXTPRibbonBar::EnableFrameTheme(int bEnable) Line 427 C++ RibbonControls.exe!CMainFrame::SetCommandBarsTheme(XTPPaintTheme paintTheme, HINSTANCE__ * hModule, const wchar_t * lpszINI) Line 1049 C++ Old themes don't have FrameShadows and pFramePaintManager->CreateShadow(GetSite()); in method CXTPCommandBarsFrameHook::EnableShadow() returns NULL. So default Ribbon has theme office2007 without frameShadow. But on setting Office2013 theme and enabling "FrameTheme" option again in CXTPCommandBarsFrameHook::EnableFrameTheme() method exits on begining
That is why to enable shadows we need to disable "FrameTheme" and then enable again as in CMainFrame::SetCommandBarsTheme() method of RibbonControls sample.
In RibbonSample:
Regards, Oleksandr Lebed |
|||
mihey
Groupie Joined: 14 May 2003 Location: Germany Status: Offline Points: 45 |
Post Options
Thanks(0)
|
||
Hello Oleksandr,
Thank you very much for the explanation. Your suggestion has helped. After I've added EnableFrameTheme(FALSE) in RibbonSample I could turn shadows there on. In case of my application the problem was also in the moment at which I tried to enable the theme. At this moment the MainWindow was hidden and Ribbon has not been initialized properly. After I moved the Theme initialization to the end of my InitInstance it worked as a should. Best regards, Mikhail |
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
||
ok, glad to hear this
|
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |