📄 hdbformview.h
字号:
// HDBFormView.h: interface for the CHDBFormView class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_HDBFORMVIEW_H__22152B62_35C3_417A_8D2B_1C1B2954A979__INCLUDED_)
#define AFX_HDBFORMVIEW_H__22152B62_35C3_417A_8D2B_1C1B2954A979__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ADOGridCtrl.h"
#include "HStatic.h"
#include "HADOSpirit.h"
#define UM_GET_QQBAR WM_USER+802
#define UM_GET_GRID WM_USER+803
#define UM_SET_GRID WM_USER+804
#define UM_GET_TREE WM_USER+805
#define UM_RECORD_GOT WM_USER+9000 //记录取得
#define ADD_GRID_ROW_MODE_BEGIN 0
#define ADD_GRID_ROW_MODE_END 1
class AFX_EXT_CLASS CHDBFormView : public CFormView,public CHADOSpirit
{
protected:
DECLARE_DYNCREATE(CHDBFormView)
public:
CHDBFormView(UINT IDD=0);
virtual ~CHDBFormView();
protected:
//{{AFX_DATA(CHDBFormView)
//}}AFX_DATA
// Operations
public:
virtual void PostGotSelGridRow(CGridMsgInfo* pGridMsgInfo);
virtual void OnRButtonDownOnGrid(CGridMsgInfo* pGridMsgInfo);
virtual void OnRButtonUpOnGrid(CGridMsgInfo* pGridMsgInfo);
virtual void OnLButtonDownOnGrid(CGridMsgInfo* pGridMsgInfo);
virtual void OnLButtonDBClkOnGrid(CGridMsgInfo* pGridMsgInfo);
virtual void OnLButtonUpOnGrid(CGridMsgInfo* pGridMsgInfo);
protected:
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHDBFormView)
public:
virtual void OnInitialUpdate();
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
public:
void EnableGridSelBkColour(BOOL bEnable=TRUE);
void DeleteRow(int nRow);
long GetSelGridRows(CIntArray &naSelRows);
void ExpandGridColumnsToFit();
int FindGridRowBy1ColValue(CString strText,int nCol);
int FindGridRowBy2ColValues(CString strColText1,
int nCol1,
CString strColText2,
int nCol2);
void SetGridItemText(int nRow,int nCol,CString steText);
void SetGridItemBkColour(int nRow, int nCol, COLORREF cr);
void SetGridRowHeight(int nRow, int nHeight);
void SetGridColumnWidth(int nCol, int nWidth);
COLORREF GetGridItemBkColour(int nRow, int nCol);
void SetGridItemImage(int nRow, int nCol, int nImage);
void SetGridColumnDataTypes(unsigned int *pColTypes,int nColCnt);
CString GetGridItemText(int nRow,int nCol);
void InvalidateGrid();
int GetGridRowCount();
int GetGridColumnCount();
void SetGridFixedRowCount(int n);
void SetGridListMode(BOOL bEnableListMode=TRUE);
void SetGridEditable(BOOL bEditable=TRUE);
int GetGridFixedRowCount();
int GetGridFixedColumnCount();
void SetGridFixedColumnCount(int n);
void EmptyGrid();
void CreateGridHeader(CStringArray &saHeader);
void DeleteSelRow();
long AddNewRowToGrid(CStringArray &saNewRow,int nMode=ADD_GRID_ROW_MODE_BEGIN);
void UpdateRowInGrid(unsigned long nRow,CStringArray &saNewRow);
void UpdateSelRow(CStringArray &saNewRow);
int FindGridHeaderSerial(CString strText);
CWnd* SetGrid(CWnd *pGrid);
CWnd* SetGridPtr(CWnd *pGrid);
CWnd* GetGrid();
CWnd* GetGridPtr();
CWnd* GetQQBarPtr();
CWnd* GetTreePtr();
int GetChildrenItemTextsFromTree(CString strPathOnTree,CStringArray &saItemText);
DWORD GetItemDataOnTree(CString strPathOnTree);
void SetTreeItemImage(CString strPathOnTree,int nIDImage1,int nIDImage2);
void GetTreeItemImage(CString strPathOnTree,int &nIDImage1,int &nIDImage2);
int GetGridItemTextsByColumn(int nCol,CStringArray &saText);
protected:
CGridCtrl *m_pGrid;
CStringArray m_saSelRow;
unsigned long m_ulSelRow;
// Generated message map functions
protected:
//{{AFX_MSG(CHDBFormView)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_HDBFORMVIEW_H__22152B62_35C3_417A_8D2B_1C1B2954A979__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -