Solved

Override MDITile behavior

Posted on 1998-02-04
2
464 Views
Last Modified: 2013-11-19
I have an MFC app that has 2 vertically tiled MDI children.  When I resize, do View Toolbar, or View StatusBar, I retile by doing a pMainWnd->MDITile(MDITILE_VERTICAL).  This works well unless I have both children up, and the selected one is on the right.  In this case, when I call MDITile, it always switches the selected one to the left.  This is annoying, especially when I minimize and then maximize -- the positions of the windows are switched.  I can't seem to find anything to override.  Is there a way around this?
0
Comment
Question by:fsiegel
2 Comments
 

Accepted Solution

by:
icotton earned 100 total points
ID: 1315592
The tiling operation will tile the MDI children according to their Z-order, highest window to the left.

To get this right, first set the focus to the left hand child. You could then change the focus back to the other window after the retiling operation.

As far as I can see this is the only way to get it right since the retiling operation is actually performed by a Windows message.
0
 

Author Comment

by:fsiegel
ID: 1315593
That's a reasonable answer.  I actually had thought of this
myself, but I was hoping there would be a slicker way.  I guess
since the tiling is done in a Windows message, this is the best
I can do.

Thanks -- Frank Siegel

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now