76 lines
1.7 KiB
C++
76 lines
1.7 KiB
C++
#if !defined(AFX_GZLISTBOX_H__D18DDDA2_2658_11D4_964F_00C0F02C4B69__INCLUDED_)
|
|
#define AFX_GZLISTBOX_H__D18DDDA2_2658_11D4_964F_00C0F02C4B69__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// gzListBox.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CgzListBox window
|
|
|
|
#include <afxtempl.h> //<--for the CArray
|
|
|
|
class CgzListBox : public CListBox
|
|
{
|
|
// Construction
|
|
public:
|
|
CgzListBox();
|
|
|
|
private:
|
|
bool m_bIsSingleSelect;
|
|
int m_nSelectionCount;
|
|
|
|
CStringList * plist;
|
|
//this is to hold the multiple selection
|
|
//list for further processing.
|
|
CArray<int,int> aryListBoxSel;
|
|
|
|
bool m_bIsBold;
|
|
LOGFONT m_lf;
|
|
CFont m_font;
|
|
COLORREF m_clrText;
|
|
COLORREF m_clrBkgnd;
|
|
CBrush m_brBkgnd;
|
|
// Attributes
|
|
public:
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CgzListBox)
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
CString GetSelectedItemVisible(int nItem);
|
|
bool m_bSingleSelect;
|
|
void RebuildIndex();
|
|
void AddRow(CString text, CString ID);
|
|
void Clear();
|
|
int SelectionCount();
|
|
CString GetSelectedItem(int nItem);
|
|
bool Select(CString ID,bool bSelect);
|
|
|
|
virtual ~CgzListBox();
|
|
|
|
// Generated message map functions
|
|
protected:
|
|
//{{AFX_MSG(CgzListBox)
|
|
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
|
|
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_GZLISTBOX_H__D18DDDA2_2658_11D4_964F_00C0F02C4B69__INCLUDED_)
|