📄 compiledialog.cpp
字号:
// Compiledialog.cpp : implementation file
//
#include "stdafx.h"
#include "notexpad.h"
#include "Compiledialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCompileDialog dialog
CCompileDialog::CCompileDialog(CWnd* pParent /*=NULL*/)
: CDialog(CCompileDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CCompileDialog)
m_fData = _T("");
//}}AFX_DATA_INIT
}
void CCompileDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCompileDialog)
DDX_Text(pDX, IDC_COMPILE_DATA, m_fData);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCompileDialog, CDialog)
//{{AFX_MSG_MAP(CCompileDialog)
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCompileDialog message handlers
BOOL CCompileDialog::OnInitDialog()
{ CDialog::OnInitDialog();
CProgressCtrl * pProg=(CProgressCtrl *) GetDlgItem(IDC_PROGRESS1);
pProg->SetRange(0,210);
m_nMax=210;
m_nStep=10;
SetTimer(1,50,NULL);//
return TRUE;
}
void CCompileDialog::OnTimer(UINT nIDEvent)
{ //TODO:Add your message handler?
CProgressCtrl *pProgCtrl=(CProgressCtrl*)GetDlgItem(IDC_PROGRESS1);
int nPrePos=(pProgCtrl->StepIt())/2;
char test[10];
wsprintf(test,"%d%%",nPrePos);
GetDlgItem(IDC_COMPILE_DIALOG)->SetWindowText(test);
if (nPrePos==100) KillTimer(1);
CDialog::OnTimer(nIDEvent);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -