Print Page | Close Window

Office 2013 and VS 12/15 Themes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=22647
Printed Date: 23 November 2024 at 8:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Office 2013 and VS 12/15 Themes
Posted By: PhilM
Subject: Office 2013 and VS 12/15 Themes
Date Posted: 30 June 2015 at 11:51am
Please can somebody explain how to use the office 2013 and VS 12/15 themes? For the other older themes the code explained in the help works perfectly...

        'Set to the Office 2010 Black. Note that you need to include the name of the ini as well
        CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Black.ini"
        CommandBars.VisualTheme = xtpThemeResource
        CommandBars.PaintManager.RefreshMetrics
        CommandBars.RecalcLayout

But this method doesn't work for the new themes, all I get is a completely black command bar, this is the same for all other controls as well.

Setting VisualTheme to xtpThemeOffice2013 instead makes buttons appear on the command bar but in a standard looking colour and the status bar is still completely black.

See these previous posts for examples with no solution...

http://forum.codejock.com/forum_posts.asp?TID=21821" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=21821

http://forum.codejock.com/forum_posts.asp?TID=21733" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=21733

Thanks


-------------
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6




Replies:
Posted By: markr
Date Posted: 30 June 2015 at 5:33pm
I recommend checking the samples, which show how to switch between the various theme types.

Note that the newer 2013 themes are set up quite a bit differently from their predecessors, but again the samples demonstrate this pretty clearly.


Posted By: PhilM
Date Posted: 01 July 2015 at 4:49am
Thanks for the reply but the code is exactly as above in the samples and yes it does work in the samples which leaves me with the issue that it just doesn't work in Openedge so it's probably just a problem that we're stuck with sadly. Just seems strange how all the older themes work and none of the newer ones do.

EDIT: Setting to new VS themes just GPFs the application so there is definitely some incompatibility with these newer themes and Openedge.


-------------
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6



Posted By: markr
Date Posted: 01 July 2015 at 11:14am
> Thanks for the reply but the code is exactly as above in the samples...

Are you certain about that? I'm using the MFC version of XTP, and the Office 2013 themes are definitely not implemented the same way as previous ones. In other words, in the MFC version you cannot use "xtpThemeResource" with the Office 2013 themes - "xtpThemeOffice2013" must be used instead, etc.


Posted By: PhilM
Date Posted: 01 July 2015 at 11:35am
Originally posted by markr markr wrote:

> Thanks for the reply but the code is exactly as above in the samples...

Are you certain about that? I'm using the MFC version of XTP, and the Office 2013 themes are definitely not implemented the same way as previous ones. In other words, in the MFC version you cannot use "xtpThemeResource" with the Office 2013 themes - "xtpThemeOffice2013" must be used instead, etc.

Yes that is the only difference which is what I mentioned in OP but it still doesn't work for us unfortunately and any of the VS themes just crash the app so clearly it just doesn't like them.

Cheers


-------------
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6



Posted By: PhilM
Date Posted: 01 July 2015 at 11:39am
We have to use the "frame" version of command bars and docking panes because the normal objects don't work with Openedge so maybe that is the difference?

-------------
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6



Posted By: Harry75
Date Posted: 01 July 2015 at 4:33pm
Relase Notes:
  • Added new Office 2013 themes for Access, Excel, One Note, Outlook, Power Point, Publisher themes and enhanced existing Word themes.
  • Added Ribbon background image support for Office 2013

I can´t find a sample !!!!!!!!! :-(


-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1 , 16.4 , 17.x , 18.x

Platform: Windows XP (32bit) - SP 3 , Windows 7 SP1 / Win 10 (64bit)

Language: Visual Basic 6.0 SP6


Posted By: kstowell
Date Posted: 02 July 2015 at 11:27pm
For MFC, the modern themes use images and colors defined the resource DLLs, therefore you must load the correct DLL and INI file to set the desired theme.  With this release we introduced a new helper class called CXTPThemeDLL to facilitate all of this.

The following code loads the Office 2013 resource DLL sets the resource handle to the MS Word INI settings file:

XTPThemeDLL()->SetHandle(xtpIniOffice2013Word);


If you look at the file "Source\Common\XTPResourceImage.h" toward the end of the file you will see a list of constants that define all of the INI files that are currently available.  It is important that you load the theme DLL first before setting the themes for any controls.

Here's and example for Command Bars that calls SetTheme and enables frame themes for the ribbon control. 

CXTPPaintManager::SetTheme(xtpThemeOffice2013);

CXTPRibbonBar* pRibbonBar = DYNAMIC_DOWNCAST(CXTPRibbonBar, GetCommandBars()->GetMenuBar());
if (pRibbonBar)
{
    pRibbonBar->EnableFrameTheme();
}
CXTPCommandBars* pCommandBars = GetCommandBars();
if (pCommandBars)
{
    pCommandBars->GetPaintManager()->RefreshMetrics();
    pCommandBars->RedrawCommandBars();
}
SendMessage(WM_NCPAINT);
RedrawWindow(0, 0, RDW_ALLCHILDREN|RDW_INVALIDATE);



-------------
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS<


Posted By: kstowell
Date Posted: 02 July 2015 at 11:30pm
Originally posted by Harry75 Harry75 wrote:

I can´t find a sample

The ActiveX samples are still in the process of getting updated, right now the MFC samples demonstrate this.  We will be adding examples for ActiveX by Beta 2.


-------------
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS<


Posted By: astoyan
Date Posted: 03 July 2015 at 7:04pm
Hello Phil,

Can you please provide an update on the recent status of the problem, if it's still relevant for you? If yes, we first need to stick to Office2013 and try to find out why it works for you in the sample but doesn't work in your application. I'd like to suggest starting with isolation test as there can be leftovers of even older version of SuitePro installed on your computer. When components of different versions are installed on one computer it's OK and the apps will work as the same components have different class IDs between versions, but it's not OK for development as there is one and only one instance of type library installed per component and some development environments rely on this type library, so there can a conflict. So, better try to install 17.0 on a separate computer or virtual OS where you are sure no SuitePro has been previously installed and do the tests of the sample and your application. You can also try to cleanup your development environment manually but in this case before installing 17.0 make sure no SuitePro traces left, use Ole View (Controls and Type Libraries group) for verification, all SuitePro entities start with 'Xtreme' word.
Keep us updated please.

Thank you.
Regards,
  Alexander


Posted By: PhilM
Date Posted: 06 July 2015 at 5:08am
OK thanks, will try it when I have chance to set up a new VM.

To be honest this is the least of our problems at the moment as we can just ignore the new themes. I'd be happier if the following issues were fixed (or workarounds offered) instead...

http://forum.codejock.com/forum_posts.asp?TID=22379" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=22379

This one makes it impossible for us to upgrade to 17...
http://forum.codejock.com/forum_posts.asp?TID=22650&KW=&title=removewindowclass-in-17b1" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=22650&KW=&title=removewindowclass-in-17b1

http://forum.codejock.com/forum_posts.asp?TID=22648&KW=&title=usesplittertracker" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=22648&KW=&title=usesplittertracker


-------------
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net