Skin + Ribbonbar + Vista: problem and solution |
Post Reply |
Author | |
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 26 October 2007 at 12:42pm |
My app uses both the ribbon bar and skins. Everything worked fine under XP but with Vista there was strange behavior with the frame and status bar. The key was to not use EnableFrameTheme on the ribbonbar. Everything now works under both XP & Vista. However the applications title bar and open/close buttons are now located above the ribbonbar quick access controls.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Try call XTPSkinFramework()->Remove(m_hWnd) for CMainFrame window.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
I assume you mean XTPSkinManager()->Remove(m_hWnd). Using this and then pRibbonBar->EnableFrameTheme() in my CMainFrame::OnCreate method helps buts doesn't fully solve the problem.
This image shows the application under vista. You see that there is still a title bar instead of having the controls inserted into the ribbon bar. However, there are no problems using the application.
This next image is the same code running under XP. It is a little hard to see, but there is now a gray border around the application, however the Frames title bar is no longer visiable and the frames controls are in the ribbon bar.
This last image is without using the XTPSkinManager()->Remove(m_hWnd) under XP. You see the gray border is no longer present. This code causes lots of problems under Vista.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Try reporoduce same problem with our sample and attach it here.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Oleg,
Attached is the modified project based on your RibbonSample. I only changed 2 files, MainFrm.cpp and RibbonSample.rc2. If you do a search with "// skin modified" you will find the changes I made. This project duplicates all the issues I raised in previous posts.
I did change the project configuration to statically link to the MFC libraries because I got a side by side error when trying to run under Vista.
-Joe
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
just move XTPSkinManager()->Remove(m_hWnd) in the beginning of OnCreate and better LoadSkin move to constructor.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
That solved the problem. Works the same under Vista and XP now. Many thanks,
-Joe
|
|
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 |