📄 cmdwaitdlg.cpp
字号:
// CWaitDialog.cpp : implementation file
//
#include "stdafx.h"
#include "CmdWaitDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWaitDialog
IMPLEMENT_DYNCREATE(CWaitDialog, CCmdTarget)
CWaitDialog::CWaitDialog()
{
m_bShowCancelButton = false;
m_Text = _T("");
m_EventName = _T("");
}
CWaitDialog::~CWaitDialog()
{
}
BEGIN_MESSAGE_MAP(CWaitDialog, CCmdTarget)
//{{AFX_MSG_MAP(CWaitDialog)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWaitDialog message handlers
void CWaitDialog::Show()
{
m_Event = CreateEvent(NULL, TRUE, FALSE, m_EventName);
m_Thread = (CWaitDlgThread *)AfxBeginThread(RUNTIME_CLASS(CWaitDlgThread), THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
m_Thread->m_Eventname = m_EventName;
m_Thread->m_Text = m_Text;
m_Thread->m_bShowCancelButton = m_bShowCancelButton;
m_Thread->ResumeThread();
}
void CWaitDialog::Close()
{
m_Thread->m_Event->SetEvent();
CloseHandle(m_Event);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -