📄 mylistview.h
字号:
#if !defined(AFX_MYLISTVIEW_H__EDC18BFE_A50B_11D4_A6D9_0010B54D545E__INCLUDED_)
#define AFX_MYLISTVIEW_H__EDC18BFE_A50B_11D4_A6D9_0010B54D545E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyListView.h : header file
//列绑定信息记录结点
struct MYBIND
{
MYBIND()
{
//初始化为0
memset(this, 0, sizeof(*this));
}
TCHAR szValue[40];
DWORD dwStatus;
};
/////////////////////////////////////////////////////////////////////////////
// CMyListView view
class COLEViewerDoc;
class CMyListView : public CListView
{
protected:
CMyListView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CMyListView)
// Attributes
public:
COLEViewerDoc* GetDocument();
// Operations
public:
void ShowProcedures(LPCTSTR lpszProcedureName);
int DisplayData(CRowset* pRS, struct MYBIND* pBind);
void ShowTableData(LPCTSTR lpszTableName);
void AdjustColumnWidths();
void ShowTableSchema(LPCTSTR lpszTableName);
void EraseList();
void AddItem(int nItem, int nSubItem, LPCTSTR lpszItem);
void DisplayColumnHeadings(UINT nStringID);
CSession* m_pSession;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyListView)
public:
virtual void OnInitialUpdate();
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CMyListView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
BOOL m_bVertical;
int m_nColumns;
ULONG m_ulFields;
CString m_strTable;
CString m_strQuery;
//{{AFX_MSG(CMyListView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in MyTreeView.cpp
inline COLEViewerDoc* CMyListView::GetDocument()
{ return (COLEViewerDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYLISTVIEW_H__EDC18BFE_A50B_11D4_A6D9_0010B54D545E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -