mrDarker
2025-06-23 69647c4a61e315027a5a222a28e34ceb1c868775
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#if !defined(AFX_XTABCTRL_H__A11951B3_2F95_11D3_A896_00A0C9B6FB28__INCLUDED_)
#define AFX_XTABCTRL_H__A11951B3_2F95_11D3_A896_00A0C9B6FB28__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// XTabCtrl.h : header file
//
 
/////////////////////////////////////////////////////////////////////////////
// CXTabCtrl window
#include <afxtempl.h>
 
class AFX_EXT_CLASS CXTabCtrl : public CTabCtrl
{
// Construction
public:
    CXTabCtrl();
 
// Attributes
public:
 
// Operations
public:
    void AddTab(CWnd* pWnd, LPTSTR lpszCaption, int iImage =0);
    void AddTab(CWnd* pWnd, LPTSTR lpszCaption, int Width, int Height, int iImage =0);
    void EnableTab(int iIndex, BOOL bEnable = TRUE);
    BOOL SelectTab(int iIndex);
    void DeleteAllTabs();
    void DeleteTab(int iIndex);
    void SetTopLeftCorner(CPoint pt);
    BOOL IsTabEnabled(int iIndex);
 
    void SetDisabledColor(COLORREF cr);
    void SetSelectedColor(COLORREF cr);
    void SetNormalColor(COLORREF cr);
    void SetMouseOverColor(COLORREF cr);
 
    void SetParentWnd(CWnd* pWnd)    { m_pParentWnd = pWnd; }
 
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CXTabCtrl)
    protected:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
    virtual void PreSubclassWindow();
    //}}AFX_VIRTUAL
 
// Implementation
public:
    virtual ~CXTabCtrl();
 
    // Generated message map functions
protected:
    CArray<BOOL, BOOL> m_arrayStatusTab; //** enabled Y\N
    int m_iSelectedTab;
    POINT m_ptTabs;
    COLORREF m_crSelected;
    COLORREF m_crDisabled;
    COLORREF m_crNormal;
    COLORREF m_crMouseOver;
    COLORREF m_crBKColor;
 
    int m_iIndexMouseOver;
    
    bool m_bMouseOver;
    bool m_bColorMouseOver;
    bool m_bColorNormal;
    bool m_bColorDisabled;
    bool m_bColorSelected;
    
    //{{AFX_MSG(CXTabCtrl)
    afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnSelchanging(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    //}}AFX_MSG
 
    DECLARE_MESSAGE_MAP()
 
    CWnd*        m_pParentWnd;
};
 
/////////////////////////////////////////////////////////////////////////////
 
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
 
#endif // !defined(AFX_XTABCTRL_H__A11951B3_2F95_11D3_A896_00A0C9B6FB28__INCLUDED_)