Solved

Getting Active MDI Window

Posted on 2004-08-12
3
332 Views
Last Modified: 2013-11-20
How do I get CWnd for the active MDI window in my application? I can get the foreground window, but that is my main application window, I need the active MDI window.
0
Comment
Question by:tcf22
[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
  • 3
3 Comments
 
LVL 5

Expert Comment

by:millsoft
ID: 11788765

    CMDIChildWnd* pActive = MDIGetActive();
0
 
LVL 5

Expert Comment

by:millsoft
ID: 11788771
Call MDIGetActive on the mainframe window
0
 
LVL 5

Accepted Solution

by:
millsoft earned 125 total points
ID: 11788775
CMDIFrameWnd::MDIGetActive
CMDIChildWnd* MDIGetActive( BOOL* pbMaximized = NULL ) const;

Return Value

A pointer to the active MDI child window.

Parameters

pbMaximized

A pointer to a BOOL return value. Set to TRUE on return if the window is maximized; otherwise FALSE.

Remarks

Retrieves the current active MDI child window, along with a flag indicating whether the child window is maximized.

Example

See the example for CMDIChildWnd::MDIMaximize.

CMDIFrameWnd Overview |  Class Members |  Hierarchy Chart

See Also   CMDIFrameWnd::MDIActivate,WM_MDIGETACTIVE

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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