📄 gui.h
字号:
// GUI.h: interface for the CGUI class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GUI_H__9F686D31_43BD_4E86_A1E0_0D2BC10E9F0A__INCLUDED_)
#define AFX_GUI_H__9F686D31_43BD_4E86_A1E0_0D2BC10E9F0A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//////////////////////////////////////////////////////////////////////////
// 类 说 明:带关键字的数组
//
// 创建时间:20081006
// 创 建 者:JQB Email:qbJi@yhte.net
//
// 版本记录:V1.0
//
//
//
//////////////////////////////////////////////////////////////////////////
template < class T >
class CArray_key
{
public:
int Add( T o)
{
return m_array.Add( o );
}
BOOL Find( int nKey, T& obj )
{
for( int i = 0; i < m_array.GetSize(); i++ )
{
T o = m_array[i];
if( o.nKey == nKey )
{
obj = o;
return TRUE;
}
}
return FALSE;
}
protected:
CArray< T, T > m_array;
};
//////////////////////////////////////////////////////////////////////////
// 类 说 明:CListCtl的再封闭,简化CListCtrl的使用
//
// 创建时间:20080922
// 创 建 者:JQB Email:qbJi@yhte.net
//
// 版本记录: V1.0
// V1.1 设置颜色
//
//
//////////////////////////////////////////////////////////////////////////
class CListCtrl_Ex : public CListCtrl
{
public:
BOOL InitListCtrl( const CString* pString, int nStringCount = 1 );
int AddRowString( const CString* pStringCell, int nStringCount = 1 );
BOOL DelRow( int nIndexRow = 1 );
BOOL EditContent( int nIndexLine, int nIndexRow, const CString& strCmt );
void SetRowColor( int nRowIndex, COLORREF clrBK, COLORREF clrTxt );
public:
struct ST_ROW_COLOR
{
COLORREF clrBK;
COLORREF clrTxt;
};
struct ST_ITEM_DATA
{
int nKey;
ST_ROW_COLOR stRowClr;
};
protected:
//{{AFX_MSG(CMyListCtrl)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDestroy();
afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
CArray_key< ST_ITEM_DATA > m_arrayItemData;
};
#endif // !defined(AFX_GUI_H__9F686D31_43BD_4E86_A1E0_0D2BC10E9F0A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -