⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 btndatabase.h

📁 是一个GridTree的控件
💻 H
字号:
/*****************************************************************************
    COPYRIGHT (C) 2000, Ken Bertelson <kenbertelson@hotmail.com>


*****************************************************************************/
#if !defined(AFX_BtnDataBase_H__937E4923_EF80_11D3_B75F_00C04F6A7AE6__INCLUDED_)
#define AFX_BtnDataBase_H__937E4923_EF80_11D3_B75F_00C04F6A7AE6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "GridCtrl.h"

class _GTC_EXT_CLASS CBtnDataBase
{
public:
	CBtnDataBase();
	virtual ~CBtnDataBase();

// Attributes
public:
    virtual void SetText(int /* nRow */, int /* nCol */, LPCTSTR szText)    { m_strText = szText; }
    virtual void SetImage(int /* nRow */, int /* nCol */, int nImage)       { m_nImage = nImage; }
    virtual void SetData(int /* nRow */, int /* nCol */, LPARAM lParam)     { m_lParam = lParam; }
    virtual void SetFormat(int /* nRow */, int /* nCol */, DWORD nFormat)   { m_nFormat = nFormat; }
    virtual void SetTextClr(int /* nRow */, int /* nCol */, COLORREF clr)   { m_crFgClr = clr; }
    virtual void SetBackClr(int /* nRow */, int /* nCol */, COLORREF clr)   { m_crBkClr = clr; }
    virtual void SetFont(int /* nRow */, int /* nCol */, const LOGFONT* plf){ memcpy(&(m_lfFont), plf, sizeof(LOGFONT)); }
    virtual void SetMargin(int /* nRow */, int /* nCol */, UINT nMargin)    { m_nMargin = nMargin; }
    virtual void SetGrid(CGridCtrl* pGrid)                                  { m_pGrid = pGrid; }
    virtual void SetEditWnd(CWnd* pEditWnd)                                 { m_pEditWnd = pEditWnd; }

    virtual LPCTSTR  GetText(int /* nRow */, int /* nCol */)
        { return (m_strText.IsEmpty())? _T("") : m_strText; }
    virtual int      GetImage(int /* nRow */, int /* nCol */)     { return m_nImage;  }
    virtual LPARAM   GetData(int /* nRow */, int /* nCol */)      { return m_lParam;  }
    virtual DWORD    GetFormat(int /* nRow */, int /* nCol */)    { return m_nFormat; }
    virtual COLORREF GetTextClr(int /* nRow */, int /* nCol */)   { return m_crFgClr; }
    virtual COLORREF GetBackClr(int /* nRow */, int /* nCol */)   { return m_crBkClr; }
    virtual const LOGFONT* GetFont(int /* nRow */, int /* nCol */)      { return &m_lfFont; }
    virtual UINT     GetMargin(int /* nRow */, int /* nCol */)    { return m_nMargin; }
    virtual CGridCtrl* GetGrid()                                  { return m_pGrid;   }
    virtual CWnd*    GetEditWnd()                                 { return m_pEditWnd; }

protected:
    CString  m_strText;     // Cell text (or binary data if you wish...)

    DWORD    m_nFormat;     // Cell format
    int      m_nImage;      // Index of the list view item抯 icon
    COLORREF m_crBkClr;     // Background colour (or CLR_DEFAULT)
    COLORREF m_crFgClr;     // Forground colour (or CLR_DEFAULT)
    LPARAM   m_lParam;      // 32-bit value to associate with item
    LOGFONT  m_lfFont;      // Cell font
    UINT     m_nMargin;     // Internal cell margin

    CGridCtrl* m_pGrid;     // Parent grid control
    CWnd* m_pEditWnd;
};

#endif // !defined(AFX_BtnDataBase_H__937E4923_EF80_11D3_B75F_00C04F6A7AE6__INCLUDED_)

⌨️ 快捷键说明

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