sheetwnd.h
来自「用bcg库编写的java IDE 源码」· C头文件 代码 · 共 135 行
H
135 行
#if !defined(AFX_SHEETWND_H__9E409B60_C74C_40AC_8C43_863FAD5E6DDA__INCLUDED_)
#define AFX_SHEETWND_H__9E409B60_C74C_40AC_8C43_863FAD5E6DDA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SheetWnd.h : header file
//
static const UINT NEAR TB_SEL_CHANGED = RegisterWindowMessage(_T("TB_SEL_CHANGED"));
#define CHD_ITEMCLICKED 0xeb9e//0x25
/////////////////////////////////////////////////////////////////////////////
// CHeaderCtrlEx window
#define ON_TB_SEL_CHANGED(memberFxn) \
ON_REGISTERED_MESSAGE(TB_SEL_CHANGED,memberFxn)
/////////////////////////////////////////////////////////////////////////////
// CSheetWnd window
class SHEETITEM
{
public:
int m_nScrollBar;
CWnd* m_pwndItem;
int m_nPos;
CString m_pszLabel;
CRect m_nRect;
SHEETITEM()
{
}
~SHEETITEM()
{
//delete m_pwndItem;
}
} /**LSHEETITEM*/;
#define nEND -1
#define VERT_SB 0x1
#define HORZ_SB 0x2
#define BOTH_SB 0x4
#define NO_SB -1
class CSheetWnd : public CWnd//CStatic
{
CArray<SHEETITEM*,SHEETITEM*> m_lItems;
CScrollBar m_wndRScrollBar;
SHEETITEM* m_pCurItem;
CFont font;
DWORD m_dwTabStyle;
COLORREF m_nTabSelColor;
HWND m_hActualHwnd;
// Construction
public:
CSheetWnd();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSheetWnd)
protected:
//}}AFX_VIRTUAL
// Implementation
public:
void RecalcLayout();
void AdjustTabs();
void DrawVcpp3DStyle(CDC* pDC,SHEETITEM *pItem);
void DrawVcppStyle(CDC* pDC,SHEETITEM *pItem);
void DrawItemsEx(CDC* pDC);
void DrawBorders(CDC* pDC,CRect rc);
void ResizeItems(CRect rc);
void ResizePane(CPoint pt);
void DrawSelection(CDC* pDC, SHEETITEM *pItem);
void DrawSelVCppStype(CDC* pDC, SHEETITEM *pItem);
void DrawSelVCppStype3d(CDC* pDC, SHEETITEM *pItem);
void DrawTabBtn(CDC* pDC,SHEETITEM *pItem);
void DrawItem(CDC* pDC);
void DrawArrow(CDC* pDC,CRect rcSrc,COLORREF cfColor,UINT nAlign);
SHEETITEM* GetCurItem(CPoint pt);
BOOL AddItem(CWnd* pwndItem,CString pszLabel, int nScrollBar = -1);
BOOL SetItem(CWnd* pwndItem,CString pszLabel,int nIndex,int nScrollBar = -1);
int SetCurSel(int nSelect);
int GetCurSel();
BOOL RemoveItem(int nIndex);
virtual ~CSheetWnd();
CWnd* m_pwndOrgParent;
void GetClientRect(LPRECT lpRect) const;
afx_msg void OnSize(UINT nType, int cx, int cy);
// Generated message map functions
protected:
//{{AFX_MSG(CSheetWnd)
afx_msg void OnPaint();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnNcCalcSize(BOOL bCalcValidRects,NCCALCSIZE_PARAMS* lpncsp);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnNcPaint();
CScrollBar m_wndVScrollBar;
CScrollBar m_wndHScrollBar;
CRect m_GripperRect;
int m_nSliderPos;
BOOL m_bTracking;
CBrush m_brBackground;
void TabSelChanged(int nSel);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SHEETWND_H__9E409B60_C74C_40AC_8C43_863FAD5E6DDA__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?