Solved

Getting Active MDI Window

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

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

Title # Comments Views Activity
paragon account problem 9 96
GIF file bit manipulation for color change 5 104
lucky13 challenge 11 113
either24  challenge 19 84
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

15 Experts available now in Live!

Get 1:1 Help Now