⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 automessagebox.h

📁 一个动态连接库(MFC扩展库)及其测试程序的例子
💻 H
字号:
#if !defined(AFX_AUTOMESSAGEBOX_H__C09C6FF7_E199_40A8_94A0_9A1EB2B67D35__INCLUDED_)
#define AFX_AUTOMESSAGEBOX_H__C09C6FF7_E199_40A8_94A0_9A1EB2B67D35__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AutoMessageBox.h : header file
//
#define IDS_MESSAGE                     1
#define IDS_TITLE                       2
#define IDC_MESSAGE                     1001
#define IDD_MESSAGEBOX                  2000
//
int __declspec( dllexport ) AutoMessageBox( int nInterval, const CString& strMessage, const CString& strTitle );
//
/////////////////////////////////////////////////////////////////////////////
// CAutoMessageBox dialog

class __declspec( dllexport ) CAutoMessageBox : public CDialog
{
private:
	UINT m_nTimerID;//定时器ID
	int m_nInterval;//对话框显示时间,以秒为单位!
	CString m_strMessage;//显示的消息
	CString m_strTitle;//显示的标题
public:
	void SetInterval( int nInterval );//设置对话框显示时间
	int GetInterval()const;//读取对话框显示时间
	void SetMessageString( const CString& strMessage );//设置显示的消息(带格式)
	CString GetMessageString()const;//读取显示的消息
	void SetTitleString( const CString& strTitle );//设置显示的标题
	CString GetTitleString()const;//读取标题

// Construction
public:
	CAutoMessageBox( int nInterval = 30 );   // standard constructor
	~CAutoMessageBox(); // standard destructor

// Dialog Data
	//{{AFX_DATA(CAutoMessageBox)
	enum { IDD = IDD_MESSAGEBOX };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAutoMessageBox)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CAutoMessageBox)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_AUTOMESSAGEBOX_H__C09C6FF7_E199_40A8_94A0_9A1EB2B67D35__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -