How To Get the Current Document in an MDI Application (111814)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
This article was previously published under Q111814 SUMMARY
To get a pointer to the currently active document from an MDI application,
use the CMDIFrameWnd::MDIGetActive() function. MDIGetActive() returns a
pointer to the active CMDIChildWnd. This CMDIChildWnd * enables you to get
a valid pointer to the currently active document via GetActiveDocument().
See the online help and "Class Libraries Reference" for more information
about these functions.
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbDocView kbhowto KB111814 |
---|
|