GME  13
ChildFrm.h
Go to the documentation of this file.
00001 // ChildFrm.h : interface of the CChildFrame class
00002 //
00004 
00005 #if !defined(AFX_CHILDFRM_H__BD235B51_BD3F_11D3_91E2_00104B98EAD9__INCLUDED_)
00006 #define AFX_CHILDFRM_H__BD235B51_BD3F_11D3_91E2_00104B98EAD9__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include "ModelPropertiesDlgBar.h"
00013 
00014 class CChildFrame : public CMDIChildWndEx
00015 {
00016         DECLARE_DYNCREATE(CChildFrame)
00017 public:
00018         CChildFrame();
00019 
00020 // Attributes
00021 protected:
00022         CString m_title;
00023         CString m_appTitle;
00024         bool sendEvent;
00025         CView* view;
00026 
00027 // Operations
00028 public:
00029 // Overrides
00030         // ClassWizard generated virtual function overrides
00031         //{{AFX_VIRTUAL(CChildFrame)
00032         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00033         //}}AFX_VIRTUAL
00034 
00035 
00036 // Implementation
00037 public:
00038         virtual ~CChildFrame();
00039 
00040         CString GetTitle(void) const;
00041         void SetTitle(const CString& title);
00042         CString GetAppTitle(void) const;
00043         void SetAppTitle(const CString& appTitle);
00044         void SetSendEvent(bool sendEventParam);
00045         void SetView(CView* viewParam);
00046         afx_msg void OnMDIActivate(BOOL bActivate,
00047                 CWnd* pActivateWnd, CWnd* pDeactivateWnd);
00048 
00049 #ifdef _DEBUG
00050         virtual void AssertValid() const;
00051         virtual void Dump(CDumpContext& dc) const;
00052 #endif
00053 
00054 public:
00055         CModelPropertiesDlgBar propBar;
00056 // Generated message map functions
00057 protected:
00058         //{{AFX_MSG(CChildFrame)
00059         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00060         afx_msg void OnClose();
00061         //}}AFX_MSG
00062         DECLARE_MESSAGE_MAP()
00063 public:
00064         afx_msg void OnSize(UINT nType, int cx, int cy);
00065         afx_msg void OnUpdateFrameTitle(BOOL bAddToTitle);
00066         virtual BOOL PreTranslateMessage(MSG* pMsg);
00067         virtual void RegisterTaskbarTab(CMDIChildWndEx* pWndBefore = NULL) { } // disable each tab showing up on the taskbar in windows 7
00068 
00069         afx_msg void PostNcDestroy() {
00070                 delete this;
00071         }
00072 
00073         BOOL Create(LPCTSTR lpszClassName,
00074                 LPCTSTR lpszWindowName, DWORD dwStyle,
00075                 const RECT& rect, CMDIFrameWnd* pParentWnd,
00076                 CCreateContext* pContext)
00077         {
00078         /* n.b. modifying style fixes a menu leak:
00079         Function tag: 0x49 (LoadMenuW)
00080         Cleanup tag: 0x6a (DestroyMenu)
00081         0x75a1a655      USER32!xxxLoadSysMenu+0x1a
00082         0x75a1a607      USER32!CreateMDIChild+0xa3
00083         0x75a1a2bf      USER32!_CreateWindowEx+0xfe
00084         0x75a08a5c      USER32!CreateWindowExW+0x33
00085         0x10009b12      LeakTrap_vc71!detail::MyCreateWindowExW+0x42
00086         0x75a1c9d0      USER32!MDIClientWndProcWorker+0x42c
00087         0x75a18585      USER32!MDIClientWndProcW+0x29
00088         0x75a062fa      USER32!InternalCallWinProc+0x23
00089         0x75a06d3a      USER32!UserCallWinProcCheckWow+0x109
00090         0x75a10d27      USER32!CallWindowProcAorW+0xab
00091         0x75a10d4d      USER32!CallWindowProcW+0x1b
00092         0x5b363b50      mfc100u!CWnd::DefWindowProcW+0x44
00093         0x5b364bc4      mfc100u!CWnd::WindowProc+0x3b
00094         0x5b362fcc      mfc100u!AfxCallWndProc+0xb5
00095         0x5b363258      mfc100u!AfxWndProc+0x37
00096         0x5b259faf      mfc100u!AfxWndProcBase+0x56
00097         0x75a062fa      USER32!InternalCallWinProc+0x23
00098         0x75a06d3a      USER32!UserCallWinProcCheckWow+0x109
00099         0x75a0965e      USER32!SendMessageWorker+0x581
00100         0x75a096c5      USER32!SendMessageW+0x7f
00101         0x5b3780a8      mfc100u!CMDIChildWnd::Create+0x103
00102         0x5b3781e4      mfc100u!CMDIChildWnd::LoadFrame+0xb9
00103         0x5b31a4b9      mfc100u!CDocTemplate::CreateNewFrame+0x60
00104         0x4e2cfc        GME!CMainFrame::CreateNewView+0x5c
00105         */
00106                 return __super::Create(lpszClassName, lpszWindowName, dwStyle & ~WS_SYSMENU, rect, pParentWnd, pContext);
00107         }
00108 };
00109 
00111 
00112 //{{AFX_INSERT_LOCATION}}
00113 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00114 
00115 #endif // !defined(AFX_CHILDFRM_H__BD235B51_BD3F_11D3_91E2_00104B98EAD9__INCLUDED_)