- 定义控件ID
#define _ID_DYN_EDIT 10000
- 动态创建控件
m_edit.Create(XXX, rect, this, _ID_DYN_EDIT );
- 编写消息处理函数
void CListCtrlEdit::OnEnEdtKillFocus()
{
}
- 关联消息处理函数到消息
BEGIN_MESSAGE_MAP()
ON_EN_KILLFOCUS(_ID_DYN_EDIT , &CEdit::OnEnEdtKillFocus)
END_MESSAGE_MAP()