tabviewctrl.h

来自「Visual C++编写的工程解析器源代码」· C头文件 代码 · 共 68 行

H
68
字号
#if !defined(AFX_TABVIEWCTRL_H__5DCE5BCF_2345_4F3A_B305_DFABC3264B50__INCLUDED_)
#define AFX_TABVIEWCTRL_H__5DCE5BCF_2345_4F3A_B305_DFABC3264B50__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabViewCtrl.h : header file
//
#define MAX_TABCTRL_CAPTIONNAME_SIZE	25
/////////////////////////////////////////////////////////////////////////////
// CTabViewCtrl window

class CTabViewCtrl : public CTabCtrl
{
	DECLARE_DYNCREATE(CTabViewCtrl)
// Construction
public:
	CTabViewCtrl();

	BOOL Create(UINT wStyle, const CRect& rect, CWnd* pParentWnd, UINT nID);

	void AddPage(CWnd* pWnd, LPCTSTR lpszText, UINT uImageIndex);
	void AddPage(CRuntimeClass* pClass,UINT nIDTemplate, LPCTSTR lpszText, UINT uImageIndex);

	BOOL RemovePage(int nIndex);
	void RemoveAllPage();
	void SetActivePage(int nIndex);

	//返回可用的页数
	int GetPageCount();
	//得到索引号为nIndex的窗口句柄
	HWND GetPageWnd(int nIndex);
	//返回当前活动页索引号
	int GetActivePageIndex(){return m_nActivePage;};
// Attributes
protected:
	int m_nActivePage;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTabViewCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CTabViewCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CTabViewCtrl)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnNcPaint();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TABVIEWCTRL_H__5DCE5BCF_2345_4F3A_B305_DFABC3264B50__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?