www.pudn.com > MyViewTab.rar > MyViewTab.h
#if !defined(AFX_MYVIEWTAB_H__7847F6A8_F437_4983_B493_7DF7C7AB53A9__INCLUDED_)
#define AFX_MYVIEWTAB_H__7847F6A8_F437_4983_B493_7DF7C7AB53A9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyViewTab.h : header file
//
#define MOVEWINDOW_DIRECT
#define TAB_HEIGHT_REVISE 2
/////////////////////////////////////////////////////////////////////////////
// CMyViewTab window
class CMyViewTab : public CTabCtrl
{
// Construction
public:
CMyViewTab();
// Attributes
public:
bool AddTabPage(int nItem, int nImage, const char * pText, CWnd * pPage);
bool SwitchPage(int nItem);
CWnd * GetPage(int nItem);
int GetPageCount(){return m_PageArray.GetSize();};
bool CreateAllPage();
void SetMsgWnd(HWND hMsgWnd, int nMsg){m_hMsgWnd=hMsgWnd;m_nMsg=nMsg;};
virtual void OnPageChange(int nItem);
void SetParentRect(RECT * pRect);
// Operations
public:
typedef struct _tag_Tab_Page_Info_
{
int nItem;
CWnd * pPage;
char strText[100];
int nImage;
int nItemIndex;
bool bInsertItem;
RECT rcDisplay;
} TAB_PAGE_INFO;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyViewTab)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyViewTab();
// Generated message map functions
protected:
CPtrArray m_PageArray;
HWND m_hMsgWnd;
int m_nMsg;
int m_nCurrentTabPageItem;
RECT m_rcPage;
//{{AFX_MSG(CMyViewTab)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYVIEWTAB_H__7847F6A8_F437_4983_B493_7DF7C7AB53A9__INCLUDED_)