formitemtable.h

来自「基于WINDOWS mobile 的用于创建一个窗体和自定义试图的工程」· C头文件 代码 · 共 59 行

H
59
字号
// FormItemTable.h: interface for the CFormItemTable class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FORMITEMTABLE_H__C2CA9FFD_F1D7_48DB_A623_04B400214692__INCLUDED_)
#define AFX_FORMITEMTABLE_H__C2CA9FFD_F1D7_48DB_A623_04B400214692__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "FormItemCombo.h"


// CFormItemTable
//
///		Uses direct table access to retrieve a list of key / description pairs
///		to be used in a combo box
//
class CFormItemTable : public CFormItemCombo  
{
public:
	CFormItemTable();
	virtual ~CFormItemTable();

	/// Initializes the form item.
	void Init(LPCTSTR	pszCaption, 
			  CSession* pSession,
			  LPCTSTR	pszTable,
			  LPCTSTR	pszIndex,
			  LPCTSTR	pszKeyCol,
			  LPCTSTR	pszValCol,
			  DWORD		dwFlags = FIF_NORMAL);

	/// Set the key value
	void Set(int nKey) {SetSelData(nKey);}

	/// Get the key value
	void Get(int &nKey) {nKey = (int)GetSelData();}

	/// Get the key value
	int GetKey() {return (int)GetSelData();}

	virtual void UpdateData();

	/// Loads the list
	void LoadList(BOOL bClear = TRUE);

protected:
	CSession*	m_pSession;
	CString		m_strTable,
				m_strIndex,
				m_strKeyCol,
				m_strValCol;
};

#endif // !defined(AFX_FORMITEMTABLE_H__C2CA9FFD_F1D7_48DB_A623_04B400214692__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?