![]() |
Tabbed MDI |
Post Reply
|
| Author | |
kelvincannon
Groupie
Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Topic: Tabbed MDIPosted: 12 November 2003 at 8:16am |
|
I have written a Tabbed MDI program with a PreCreateWindow function as follows: BOOL CDigitizeFrame::PreCreateWindow(CREATESTRUCT& cs) The problem is that when I tab to the next window it is drawn as a restored window and not a maximized windows. Does anyone know how to prevent this from happening. Thanks Kelvin
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 November 2003 at 8:31am |
|
You remove WS_MAXIMIZEBOX flag and it cant be maximized. Try to remove this line cs.style &= ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kelvincannon
Groupie
Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 November 2003 at 9:08am |
|
I can not do that because I need the windows to remain maximized and not let the user changed them. Thanks Kelvin
|
|
![]() |
|
Matt1
Newbie
Joined: 06 November 2003 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 November 2003 at 12:28pm |
|
This is an MFC issue. |
|
![]() |
|
Matt1
Newbie
Joined: 06 November 2003 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 12 November 2003 at 1:01pm |
|
Kelvin,
This actually seems to work well with ToolkitPro when combined with a child window that doesn't have Min/Max box styles like yours. For straight MFC this does not work so well because the Min/Max boxes sometimes show up for some reason. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2003 at 12:58am |
|
If you use ToolkitPro you can add CXTPCommandBar* pMenuBar = pCommandBars->SetMenu("Menu Bar", IDR_MAINFRAME); this hide minimize and maximize buttons in the menu bar. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kelvincannon
Groupie
Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 16 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2003 at 7:44am |
|
Thanks oleg that worked ok only you must place it after "LoadCommandBars(_T("Bar State"));"
|
|
![]() |
|
ddyer
Groupie
Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 December 2003 at 12:02pm |
|
I used the OnSize tip and and it worked great. It even removed that annoying "flash" when tabbing between the windows caused by rendering the "normal size" window frame then erasing it and rendering the maximized frame. BUT... create three frames, then click on the middle tab (frame #2 on forefront). Now resize the window. As you resize, the XTP MDI manager goes nuts making frames #2 and #3 alternately the forefront window.
You can easily replicate this by adding the OnSize bit to the GUI_VisualStudio7 demo, then when running it select File->New->File three times and resize the application: void CChildFrame::OnSize(UINT nType, int cx, int cy)
Is this an XTP bug? Edited by ddyer |
|
![]() |
|
ddyer
Groupie
Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 December 2003 at 12:01pm |
|
A fix for the above problem is to place the OnSize code above into ShowWindow. You still get that annoying redraw flash whenver you click on a tab, but it works: Any thoughts on how to prevent the redraw flashing? void CChildFrame::OnShowWindow(BOOL bShow, UINT nStatus){ CMDIChildWnd::OnShowWindow(bShow, nStatus); if (bShow) { |
|
![]() |
|
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 |