ctabctrlview.h

来自「保护装置的mbpc软件」· C头文件 代码 · 共 115 行

H
115
字号
#if !defined(AFX_CTabCtrlView_H__8E652EC1_5159_11D1_96A0_0E6B8A000000__INCLUDED_)
#define AFX_CTabCtrlView_H__8E652EC1_5159_11D1_96A0_0E6B8A000000__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// CTabCtrlView.h : header file
//

#include "afxcmn.h"

class CTabCtrlView;

class CViewTabCtl : public CTabCtrl
{
// Construction
public:
        CViewTabCtl();

// Attributes
public:

// Operations
public:
        
// Overrides
        // ClassWizard generated virtual function overrides
        //{{AFX_VIRTUAL(CViewTabCtl)
        //}}AFX_VIRTUAL

// Implementation
public:
        void SetView(CTabCtrlView* pView);
        virtual void RecalcLayout(CRect& rect, CWnd* wnd);
        virtual ~CViewTabCtl();
        virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);

        // Generated message map functions
protected:
        CTabCtrlView* m_pView;
        CString m_sGrayFont;
        CString m_sSelFont;
        CDC m_dc;
        CFont m_selFont;
        virtual BOOL HandleTabs(int sel);
        //{{AFX_MSG(CViewTabCtl)
        afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult);
        //}}AFX_MSG

        DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CCTabCtrlView window

// The actual tab control
// Wrapper Window Handles Interfacing to MFC doc View Model
// and resizing of the Tab Ctrl
class CTabCtrlView : public CWnd
{
// Construction
public:
        CTabCtrlView();

// Attributes
public:

// Operations
public:

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

// Implementation
public:
        virtual BOOL HandleTabs(int sel);
        void SetTab(int Tab);
        virtual void SetView();
        void RecalcLayout();
        CView* GetActiveView();
        BOOL CreateStatic(CWnd* pParentWnd, DWORD dwStyle = WS_CHILD | WS_VISIBLE, UINT nID = AFX_IDW_PANE_FIRST);
        virtual CView* CreateView(CRuntimeClass* pViewClass, SIZE sizeInit, CCreateContext* pContext );
        virtual ~CTabCtrlView();

        // Generated message map functions
protected:
        virtual void InitTabs(CTabCtrlView* pView);
        CViewTabCtl m_TabCtl;
        CView* m_ActiveView;
        
        BOOL CreateCommon(CWnd* pParentWnd, SIZE sizeMin, DWORD dwStyle, UINT nID);
        //{{AFX_MSG(CCTabCtrlView)
        afx_msg void OnSize(UINT nType, int cx, int cy);
        afx_msg BOOL OnEraseBkgnd(CDC* pDC);
        afx_msg void OnPaint();
        //}}AFX_MSG

        DECLARE_MESSAGE_MAP()
};

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

/////////////////////////////////////////////////////////////////////////////
// CViewTabCtl window


//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CTabCtrlView_H__8E652EC1_5159_11D1_96A0_0E6B8A000000__INCLUDED_)

⌨️ 快捷键说明

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