How to create the MDIClient window by using MFC (129471)
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.51
- 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
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q129471 Note Microsoft Visual C++ NET (2002) supported both the managed code
model that is provided by the .NET Framework, and the unmanaged native Windows
code model. The information in this article applies to unmanaged Visual C++
code only.
SUMMARY In MFC, the MDICLIENT window is stored in a public HWND
member variable ( m_hwndMDIClient) in the CMDIFrameWnd class. CMDIFrameWnd is the base class of the CMainFrame class in an AppWizard-generated MDI application. To
subclass the MDICLIENT window, you must perform the following three steps
: - Use ClassWizard to derive a class from CWnd that is named CMDIClientWnd.
- Add theGetSuperWndProcAddr() function to CMDIClientWnd.
- Use CMDIClientWnd to subclass the MDICLIENT window.
After you have subclassed the MDICLIENT window with CMDIClientWnd, message handlers and other functions can be placed in the CMDIClientWnd class.
Modification Type: | Major | Last Reviewed: | 4/28/2005 |
---|
Keywords: | kbhowto kbMDI kbProgramming KB129471 kbAudDeveloper |
---|
|