#pragma once
|
#include "afxdialogex.h"
|
|
|
// CInputDialog 对话框
|
|
class CInputDialog : public CDialogEx
|
{
|
DECLARE_DYNAMIC(CInputDialog)
|
|
public:
|
CInputDialog(const CString& strTitle, const CString& strPrompt, CWnd* pParent = nullptr);
|
virtual ~CInputDialog();
|
|
CString GetInputText() const; // 获取输入内容
|
|
// 对话框数据
|
#ifdef AFX_DESIGN_TIME
|
enum { IDD = IDD_DIALOG_INPUT };
|
#endif
|
|
private:
|
CEdit m_editInput;
|
CStatic m_staticPrompt;
|
|
CString m_strTitle; // 对话框标题
|
CString m_strPrompt; // 提示文本
|
CString m_strInput; // 输入的文本
|
|
protected:
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
DECLARE_MESSAGE_MAP()
|
public:
|
virtual BOOL OnInitDialog();
|
afx_msg void OnBnClickedOk();
|
};
|