Release v1.1.3

This commit is contained in:
yuanyuanxiang
2025-07-19 21:37:50 +08:00
parent e7f06abcea
commit 1b1ce090c8
14 changed files with 184 additions and 27 deletions

View File

@@ -12,6 +12,7 @@ IMPLEMENT_DYNAMIC(CInputDialog, CDialogEx)
CInputDialog::CInputDialog(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_DIALOG_INPUT, pParent)
, m_sSecondInput(_T(""))
{
m_hIcon = NULL;
}
@@ -23,6 +24,10 @@ CInputDialog::~CInputDialog()
void CInputDialog::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_STATIC_SECOND, m_Static2thInput);
DDX_Control(pDX, IDC_EDIT_SECOND, m_Edit2thInput);
DDX_Text(pDX, IDC_EDIT_SECOND, m_sSecondInput);
DDV_MaxChars(pDX, m_sSecondInput, 100);
}
@@ -39,6 +44,11 @@ BOOL CInputDialog::Init(LPCTSTR caption, LPCTSTR prompt) {
return TRUE;
}
void CInputDialog::Init2(LPCTSTR name, LPCTSTR defaultValue) {
m_sItemName = name;
m_sSecondInput = defaultValue;
}
BOOL CInputDialog::OnInitDialog()
{
CDialogEx::OnInitDialog();
@@ -47,6 +57,11 @@ BOOL CInputDialog::OnInitDialog()
SetWindowText(m_sCaption);
GetDlgItem(IDC_STATIC)->SetWindowText(m_sPrompt);
m_Static2thInput.SetWindowTextA(m_sItemName);
m_Static2thInput.ShowWindow(m_sItemName.IsEmpty() ? SW_HIDE : SW_SHOW);
m_Edit2thInput.SetWindowTextA(m_sSecondInput);
m_Edit2thInput.ShowWindow(m_sItemName.IsEmpty() ? SW_HIDE : SW_SHOW);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE