Solved

Getting Active MDI Window

Posted on 2004-08-12
3
327 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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