// WaitDlg.h
#pragma once
#include "resource.h"
#include <afxmt.h>
#include "WaitDlgThread.h"
class CWaitDlg : public CDialog
{
public:
enum { IDD = IDD_WAITING_DIALOG };
public:
CWaitDlg(CWnd* pParent = NULL);
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
protected:
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnTimer(UINT nIDEvent);
DECLARE_MESSAGE_MAP()
public:
CWaitDlgThread* m_pcWaitDlgThread;
CString m_strWaitTipText;
};
// WaitDlg.cpp
#include "stdafx.h"
#include "WaitDlg.h"
CWaitDlg::CWaitDlg(CWnd* pParent /*=NULL*/)
: CDialog(CWaitDlg::IDD, pParent)
{
m_pcWaitDlgThread = NULL;
m_strWaitTipText = "";
}
void CWaitDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MES

这篇博客详细介绍了如何在MFC环境下创建并使用一个简单的等待对话框类,包括了WaitDlg、WaitDlgThread、WaitTip等组件的实现代码,帮助开发者在多线程应用中实现用户友好的等待提示。
最低0.47元/天 解锁文章
647

被折叠的 条评论
为什么被折叠?



