Retrieving the CMDIChildWnd Parent WindowLast reviewed: October 10, 1997Article ID: Q101184 |
1.00 1.50 1.51 1.52 | 1.00 2.00 2.10 4.00
WINDOWS | WINDOWS NTkbprg The information in this article applies to:
SUMMARYWhen creating a CMDIChildWnd, the parent of the multiple document interface (MDI) window is a "MDICLIENT" control. The handle to the parent frame window can be retrieved in the following way:
hwnd =::GetParent(lpcreatestruct.hwndParent);Alternatively, use the following
CMDIFrameWnd* pFrame = (CMDIFrameWnd*)GetParentFrame();to acquire a pointer to the parent MDI frame window object.
NOTE: GetParentFrame is declared to return a pointer to a CFrameWnd object, and therefore it is necessary to typecast the result to a CMDIFrameWnd object. |
Additional reference words: kbinf 1.00 1.5 1.51 1.52 2.00 2.10 2.5 2.51
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |