📄 hisdlg.cpp
字号:
// HisDlg.cpp : implementation file
//
#include "stdafx.h"
#include "test1.h"
#include "HisDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CHisDlg dialog
CHisDlg::CHisDlg(CWnd* pParent /*=NULL*/)
: CDialog(CHisDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CHisDlg)
//}}AFX_DATA_INIT
}
void CHisDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CHisDlg)
DDX_Control(pDX, IDC_DELETE, m_btnDelete);
DDX_Control(pDX, IDC_CLEAR, m_btnClear);
DDX_Control(pDX, IDC_LIST, m_list);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CHisDlg, CDialog)
//{{AFX_MSG_MAP(CHisDlg)
ON_BN_CLICKED(IDC_CLEAR, OnClear)
ON_BN_CLICKED(IDC_DELETE, OnDelete)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CHisDlg message handlers
void CHisDlg::OnClear()
{
// TODO: Add your control notification handler code here
m_list.ResetContent();
}
void CHisDlg::OnDelete()
{
// TODO: Add your control notification handler code here
int nIndex = m_list.GetCurSel();
m_list.DeleteString(nIndex);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -