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

📄 mylist.cpp

📁 这是书上的代码
💻 CPP
字号:
// MyList.cpp : implementation file
//

#include "stdafx.h"
#include "T_FlexGrid.h"
#include "MyList.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyList

CMyList::CMyList()
{
}

CMyList::~CMyList()
{
}


BEGIN_MESSAGE_MAP(CMyList, CListBox)
	//{{AFX_MSG_MAP(CMyList)
	ON_CONTROL_REFLECT(LBN_SELCHANGE, OnSelchange)
	ON_CONTROL_REFLECT(LBN_KILLFOCUS, OnKillfocus)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyList message handlers

void CMyList::OnSelchange() 
{
	//向对话框发送列表框数据改变的消息
	(GetParent()->GetParent())->SendMessage(LIST_DATA_CHANGED);
	//选择后就销毁窗口
	DestroyWindow();
}

void CMyList::OnKillfocus() 
{
	//UpdateWindow();
	//DestroyWindow();		
}

⌨️ 快捷键说明

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