![]() |
Toggling frame theme is buggy |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() Posted: 22 July 2009 at 6:21pm |
XTP 13.1, RibbonSample.
When toggling the frame theme, the window is restored. This is very annoying, so I removed the ShowWindow-call below. However, if removed, the behavior is really weird (buggy). I have found that Vista GUI changes the logic somehow. Can you please test this function a little bit and comment?
void CMainFrame::OnFrameTheme()
{ ShowWindow(SW_NORMAL); // Why?! Removing it solves one thing, but screws another... CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)GetCommandBars()->GetAt(0); CXTPWindowRect rc( this);rc.top += (pRibbonBar->IsFrameThemeEnabled() ? -1 : +1) * GetSystemMetrics(SM_CYCAPTION); MoveWindow(rc); pRibbonBar->EnableFrameTheme(!pRibbonBar->IsFrameThemeEnabled()); } |
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
So "screws another" problem is restoring that you don't like ? Don't think your customers will switch it each day. Guess they can live with restoring frame once in life :)
anyway you can check WS_MAXIMIZE style and Maximize it back after you switch it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Well, if I started my application in a maximized state I do not want to restore it just like that. And if I remove that ShowWindow-call, the frame theme gets screwed in Vista Aero (until I restart my application, of course). But sure, I can live with a "restoration" once every 313 days :P |
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
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 |