errorlogdialog.cpp
来自「一个完全使用MFC框架开发的C++编译器的代码。功能十分强大可以编译大型程序。」· C++ 代码 · 共 74 行
CPP
74 行
// ErrorLogDialog.cpp : implementation file
//
#include "stdafx.h"
#include "Quincy.h"
#include "ErrorLogDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CErrorLogDialog dialog
CErrorLogDialog::CErrorLogDialog(CWnd* pParent)
: CDialog(CErrorLogDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CErrorLogDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CErrorLogDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CErrorLogDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CErrorLogDialog, CDialog)
//{{AFX_MSG_MAP(CErrorLogDialog)
ON_LBN_DBLCLK(IDC_ERRORLIST, OnDblclkErrorlist)
ON_WM_CREATE()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CErrorLogDialog message handlers
void CErrorLogDialog::OnDblclkErrorlist()
{
OnOK();
}
void CErrorLogDialog::OnOK()
{
// -- get the current selection and send to CQuincyApp object
CListBox* pList = static_cast<CListBox*>(GetDlgItem(IDC_ERRORLIST));
ASSERT(pList != 0);
theApp.SelectErrorLine(pList->GetCurSel());
}
int CErrorLogDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
theApp.RestoreDialogWindowPosition("ErrorLog", this);
return 0;
}
void CErrorLogDialog::OnDestroy()
{
theApp.SaveDialogWindowPosition("ErrorLog", this);
CDialog::OnDestroy();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?