📄 dbcombobox.h
字号:
#if !defined(AFX_DBCOMBOBOX_H__D5345EA9_0632_496F_B05B_1E697E0C403A__INCLUDED_)
#define AFX_DBCOMBOBOX_H__D5345EA9_0632_496F_B05B_1E697E0C403A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DBComboBox.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDBComboBox window
#include <afxdb.h>
class AFX_EXT_CLASS CDBComboBox : public CComboBox
{
// Construction
public:
CDBComboBox();
void SetDatabase(CDatabase *pDatabase);
// Attributes
public:
// Operations
public:
// Overrides
protected:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDBComboBox)
//}}AFX_VIRTUAL
CDatabase *m_pDatabase;
CRecordset *m_pRecordset;
CString m_strSQL;
CString m_strTableSource;
CString m_strFieldSource;
CString m_strTableStore;
CString m_strFieldStore;
CString m_strFilter;
BOOL m_bAllowUpdateStoreTable;
// Implementation
public:
void SetText(CString strItem);
unsigned long GetNextIndex(CString strFieldName,CString strTableName);
void SetFilter(CString strFilter);
unsigned long GetItems(CString strItemSource,
CDatabase *pDatabase=NULL,
BOOL bAllowUpdateStoreTable=TRUE,
CString strItemStore="",
CString strFilter="");
unsigned long FillItems();
unsigned long FillWithSQL(CDatabase *pDatabase, CString strSQL);
void FillWithStringList(CString *pstrItemList,int nListLength);
long FillWithRecordset(CRecordset* pRecordset);
virtual ~CDBComboBox();
// Generated message map functions
protected:
//{{AFX_MSG(CDBComboBox)
afx_msg void OnKillfocus();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DBCOMBOBOX_H__D5345EA9_0632_496F_B05B_1E697E0C403A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -