Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Gap Between Frame and Empty Ribbon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gap Between Frame and Empty Ribbon

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: Gap Between Frame and Empty Ribbon
    Posted: 15 May 2008 at 5:49pm
When my MDI app starts up, the ribbon is empty and no documents are open (intentionally).  In that state, I'm seeing a black gap between the frame and the empty ribbon.
 
 
 
If I resize the frame slightly, that area repaints correctly.
 
 
This is not the only way I can get into this state, but it is the most glaring, since it's the first thing my user sees.  Any guesses on what is causing this?
--Mike
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 1:30am
Hi,
 
Do you see same with our RibbonSample? Can you try to modify it to see same ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2008 at 4:25pm

Yes, I can cause this in your RibbonSample in 11.2.0 and 11.2.1 by commenting out a few lines, or just by playing some debugger magic.  It doesn't happen in 11.2.2 or 12.0.  I know you are going to tell me to upgrade, but I simply cannot do that at this stage of my release cycle.  My shop is very strict about when new libraries are acceptable, and that time is in my rearview mirror for this release.

Here's how to reproduce it.  Set a break in RibbonMDISample.cpp / CRibbonMDISampleApp::InitInstance at the call to ProcessShellCommand.  Deposit a -1 in cmdInfo.m_nShellCommand (to prevent a default document from being created).  Set another break in MainFrm.cpp / CMainFrame::CreateRibbonBar at the call to pRibbonBar->AddTab(ID_TAB_HOME);  Don't let that execute; instead, just do a "set next statement" down to

pRibbonBar->EnableFrameTheme();.  That should be all it takes to see the same black bar.

Is there any way to work around this in 11.2.0, or a simple fix that could be pulled back?  I've tried calling pFrame->RecalcLayout and pRibbon->Redraw(0,FALSE) right after I create the ribbon, but that didn't help.  The frame wasn't on the screen yet, so that may have been too early.

Thanks.

--Mike
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2008 at 6:02pm
How about just a clue as to where the frame gets drawn?  Maybe I can work backwards from there to see a workaround.
--Mike
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2008 at 1:16am
Hello,
 
11.2.2 has only fixes for 11.2.1.  Think its safe to update.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2008 at 9:12am
You may think it's safe, I may think it's safe, and Laurence Olivier may think it's safe, but my boss is not going to allow an update this close to our ship date.  Not gonna happen. 
 
Now, workarounds, that's a different story.  Are there any calls I could make to refresh that part of the screen at strategic times?  So far I've tried pFrame->Invalidate, InvalidateRect, RecalcLayout and pRibbon->Redraw with no success.
--Mike
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.234 seconds.