1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // MyMid.h: interface for the CMyMid class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MYMID_H__475A2490_56CA_4E11_9D8F_F0DA55816154__INCLUDED_)
- #define AFX_MYMID_H__475A2490_56CA_4E11_9D8F_F0DA55816154__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "ChildFrm.h"
- //登记MDI窗口的打开和关闭
- class CMyMdi
- {
- protected:
- public:
- void CloseAll();
- void DeleteAll(void);
- struct tabMyMdi
- {
- char szName[65];
- CWnd *pView;
- CWnd *pSubView;
- tabMyMdi *pNext;
- };
- //m_pMyMdi必需以tabMyMdi*指针类型使用
- //设置为void*类型,因为tabMyMdi为内部类型
- //不能以静态方式初始化m_pMyMdi指针
- static void *m_pMyMdi;
- static BOOL m_bExitCode;
- void SetExitCode(BOOL bCode){m_bExitCode=bCode;}
- static BOOL GetExitCode(void){return m_bExitCode;}
-
- BOOL MainClose(BOOL bMsg = true);
- BOOL ChildClose(CWnd *pView);
- int Append(char *pName, CRuntimeClass* pNewViewClass,
- UINT nIcon=0,CWnd* pParentWnd = NULL,
- UINT nID = 0); //打开
- BOOL Delete(char *pName); //删除
- BOOL Delete(CWnd *pView); //删除
- BOOL SetSubView(CWnd *pView, CWnd *pDlg);
- CWnd *GetSubView(CWnd *pView);//取子窗口指针
- char *GetName(CWnd *pView); //取窗口名称
- CWnd *GetView(char *pName); //取窗口名称
- int GetIndex(char *pName); //取窗口索引
- int GetCount();
- CMyMdi();
- virtual ~CMyMdi();
- };
- #endif // !defined(AFX_MYMID_H__475A2490_56CA_4E11_9D8F_F0DA55816154__INCLUDED_)
|