Tabbed MDI flicker |
Post Reply |
Author | |
spiderM9
Newbie Joined: 21 October 2003 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 21 October 2003 at 5:34pm |
I was running the demo MDITabDemo (also occurs on other demo programs that support the tabbed MDI style) and noticed that eery time a tab for an unexposed window is clicked, there is a very brief flicker where an MDI child window shows itself in the "Restored" state just prior to maximizing and showing in the "Tabbed" state. I also noticed that the Tabbed MDI seems to be implemented by piggybacking on top of regular MDI, such that the child windows can be "Restored" to what is basically regular MDI mode with the tab bar serving as a mechanism to front windows. This is not the behavior of Tabbed MDI in Visual Studio. Is it possible to eliminate this feature (and along with it eliminating both the MDI child menu additions to the main frame menu) and will doing so eliminate the flicker, or would I need to implement my own Tabbed MDI (basically doing so in SDI mode I imagine)?
|
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, Add the following code to your CChildFrame class to eliminate the flicker you see when switching MDI tabs: BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs){ // make sure view is maximum size to eliminate // flicker when switching tabs. cs.x = cs.y = 0; cs.cx = cs.cy = 32767; // TODO: Modify the Window class or styles here by modifying return TRUE; void CChildFrame::ActivateFrame(int nCmdShow){ // first window should be maximized if (GetParent()->GetWindow(GW_CHILD) == this) { nCmdShow = SW_SHOWMAXIMIZED; } CXTMDIChildWnd::ActivateFrame(nCmdShow); Let me know if this helps. Edited by Administrator |
|
tymberwyld
Newbie Joined: 30 August 2005 Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Hi, can anyone convert this to C#? I'm not familiar with the C++
Forms structure and so it's kind of difficult to see what's going on
here. I understand the CreateParams structure, but the ActiveFrame() method is throwing me.
Thanks for any help! |
|
g_j_a_i_n
Groupie Joined: 27 August 2005 Status: Offline Points: 91 |
Post Options
Thanks(0)
|
Thanks support. That code really helped. If any one of you wants to hide the maximize & minimize buttons, you can use the following code CXTPCommandBar* pMenuBar = pCommandBars->SetMenu("Menu Bar", IDR_MAINFRAME); pMenuBar->SetFlags(xtpFlagHideMinimizeBox | xtpFlagHideMaximizeBox); |
|
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 |