Solved

Override MDITile behavior

Posted on 1998-02-04
2
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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