• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 342
  • Last Modified:

Getting Active MDI Window

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
tcf22
Asked:
tcf22
  • 3
1 Solution
 
millsoftCommented:

    CMDIChildWnd* pActive = MDIGetActive();
0
 
millsoftCommented:
Call MDIGetActive on the mainframe window
0
 
millsoftCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now