I modified the Samples\Ribbon\RibbonSample project. In CMainFrame::OnViewOfficeTheme I added this code:
CThemeDlg dlg(this); dlg.ExcludeTheme( XTP_EXCLUDE_THEME_VISUALSTUDIO6 | XTP_EXCLUDE_THEME_VISUALSTUDIO2005 | XTP_EXCLUDE_THEME_VISUALSTUDIO2008 | XTP_EXCLUDE_THEME_VISUALSTUDIO2010 | XTP_EXCLUDE_THEME_VISUALSTUDIO2012 | XTP_EXCLUDE_THEME_OFFICE2000 | XTP_EXCLUDE_THEME_OFFICEXP | XTP_EXCLUDE_THEME_OFFICE2003 | XTP_EXCLUDE_THEME_NATIVEWINDOWS | XTP_EXCLUDE_THEME_CUSTOM);
// set startup theme dlg.SetTheme( xtpThemeDlgOffice2016, xtpThemeColor2016Colorful, #ifdef _XTP_INCLUDE_RIBBON xtpThemeAccentWord, xtpThemeRibbonBackCircuit); #else xtpThemeAccentWord); #endif
dlg.DoModal();
In OnInitDialog I also added a call to EnableAutoPreview(TRUE);
The result is the same as I see with our application. If you make changes to the style, the application jumps on top of the dialog. Bitten by the shadow code once again. Float the "Styles" docking pane and I see it too disappears behind the application window.
As we have had issues before with shadows, I had looked at this ribbonsample code and fashioned our sequence of calls to manipulate the theme the same way the sample did. So we first call the ribbon bar EnableFrameTheme(FALSE) and then call it again later with TRUE (for our app it is always enabled). Now I find that I need to skip the first call to set FALSE. I can do that in our app and the sample and the windows remain as they should. I have a long comment in our code outlining all the issues making these calls "fixed". So I have to start testing what will break if I make this change to work around yet another shadow problem.
|