📄 mysqlmanagerview.cpp
字号:
//author : Jarry
//E-mail : lansingk@online.sh.cn
// mysqlManagerView.cpp : implementation of the CRecordsView class
//
#include "stdafx.h"
#include "mysqlManager.h"
#include "mysqlManagerDoc.h"
#include "mysqlManagerView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRecordsView
IMPLEMENT_DYNCREATE(CRecordsView, CListView)
BEGIN_MESSAGE_MAP(CRecordsView, CListView)
//{{AFX_MSG_MAP(CRecordsView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRecordsView construction/destruction
CRecordsView::CRecordsView()
{
// TODO: add construction code here
}
CRecordsView::~CRecordsView()
{
}
BOOL CRecordsView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style |= LVS_REPORT;
return CListView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CRecordsView drawing
void CRecordsView::OnDraw(CDC* pDC)
{
CMysqlManagerDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CListCtrl& refCtrl = GetListCtrl();
refCtrl.InsertItem(0, "Item !");
// TODO: add draw code for native data here
}
void CRecordsView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// TODO: You may populate your ListView with items by directly accessing
// its list control through a call to GetListCtrl().
}
/////////////////////////////////////////////////////////////////////////////
// CRecordsView printing
BOOL CRecordsView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CRecordsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CRecordsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CRecordsView diagnostics
#ifdef _DEBUG
void CRecordsView::AssertValid() const
{
CListView::AssertValid();
}
void CRecordsView::Dump(CDumpContext& dc) const
{
CListView::Dump(dc);
}
CMysqlManagerDoc* CRecordsView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMysqlManagerDoc)));
return (CMysqlManagerDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CRecordsView message handlers
void CRecordsView::OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct)
{
//TODO: add code to react to the user changing the view style of your window
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -