⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mylistctrl.cpp

📁 这是相当于一个通讯簿
💻 CPP
字号:
// MyListCtrl.cpp : implementation file
//

#include "stdafx.h"
#include "TelBook.h"
#include "MyListCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMyListCtrl

CMyListCtrl::CMyListCtrl()
{
	sequence = false;
}

CMyListCtrl::~CMyListCtrl()
{
}


BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
	//{{AFX_MSG_MAP(CMyListCtrl)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyListCtrl message handlers
int CMyListCtrl::findItem(int nCol,CString find_str)
{
	if( nCol==0 ){
		LVFINDINFO FindInfo;//设置查找的信息
		FindInfo.flags=LVFI_STRING;
		FindInfo.psz=find_str;
		return FindItem(&FindInfo);
	}
	int N = GetItemCount();
	for(int i=0;i<N;i++){
		if( GetItemText(i,nCol)==find_str )
			return i;
	}
	return -1;

}

⌨️ 快捷键说明

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