📄 tablelist.cpp
字号:
// TableList.cpp : implementation file
//
#include "stdafx.h"
#include "VDB.h"
#include "TableList.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTableList
IMPLEMENT_DYNCREATE(CTableList, CListView)
CTableList::CTableList()
{
}
CTableList::~CTableList()
{
}
BEGIN_MESSAGE_MAP(CTableList, CListView)
//{{AFX_MSG_MAP(CTableList)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTableList drawing
void CTableList::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CTableList diagnostics
#ifdef _DEBUG
void CTableList::AssertValid() const
{
CListView::AssertValid();
}
void CTableList::Dump(CDumpContext& dc) const
{
CListView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTableList message handlers
BOOL CTableList::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
cs.style |= WS_HSCROLL | WS_VSCROLL | LVS_SINGLESEL | LVS_REPORT | LVS_SHAREIMAGELISTS;
return CListView::PreCreateWindow(cs);
}
void CTableList::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CListCtrl& ListCtrl = GetListCtrl();
ListCtrl.SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT|LVS_REPORT);
ListCtrl.InsertColumn(0, "说明", LVCFMT_LEFT, 150);
ListCtrl.InsertColumn(0, "自增", LVCFMT_LEFT, 40);
ListCtrl.InsertColumn(0, "默认值", LVCFMT_LEFT, 100);
ListCtrl.InsertColumn(0, "空", LVCFMT_LEFT, 30);
ListCtrl.InsertColumn(0, "长度", LVCFMT_LEFT, 50);
ListCtrl.InsertColumn(0, "类型", LVCFMT_LEFT, 70);
ListCtrl.InsertColumn(0, "列名", LVCFMT_LEFT, 100);
ListCtrl.InsertColumn(0, "", LVCFMT_LEFT, 10);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -