Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Office 2013 and VS 12/15 Themes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Office 2013 and VS 12/15 Themes

 Post Reply Post Reply
Author
Message
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post Topic: Office 2013 and VS 12/15 Themes
    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...



Thanks
Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6

Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (1) Thanks(1)   Quote markr Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Harry75 View Drop Down
Groupie
Groupie
Avatar

Joined: 30 March 2014
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Harry75 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post 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<
Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post 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<
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PhilM View Drop Down
Groupie
Groupie


Joined: 24 March 2009
Location: United Kingdom
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilM Quote  Post ReplyReply Direct Link To This Post 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...


This one makes it impossible for us to upgrade to 17...

Product: Xtreme SuitePro (ActiveX) version 17.3.0

Platform: Windows 10 / Windows 7

Language: Openedge 11.6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.