Solved

Getting Active MDI Window

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 129
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 103
only14 challenge 19 82
post4 challenge 28 105
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.

820 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