ciderpress/app/AddClashDialog.cpp

52 lines
1.1 KiB
C++
Raw Normal View History

2007-03-27 17:47:10 +00:00
/*
* CiderPress
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
* See the file LICENSE for distribution terms.
*/
#include "stdafx.h"
#include "ConfirmOverwriteDialog.h"
#include "AddClashDialog.h"
BEGIN_MESSAGE_MAP(AddClashDialog, CDialog)
ON_BN_CLICKED(IDC_CLASH_RENAME, OnRename)
ON_BN_CLICKED(IDC_CLASH_SKIP, OnSkip)
2007-03-27 17:47:10 +00:00
END_MESSAGE_MAP()
/*
* Replaces some static text fields.
2007-03-27 17:47:10 +00:00
*/
BOOL AddClashDialog::OnInitDialog(void)
2007-03-27 17:47:10 +00:00
{
CWnd* pWnd;
2007-03-27 17:47:10 +00:00
pWnd = GetDlgItem(IDC_CLASH_WINNAME);
2014-11-18 05:13:13 +00:00
ASSERT(pWnd != NULL);
pWnd->SetWindowText(fWindowsName);
2007-03-27 17:47:10 +00:00
pWnd = GetDlgItem(IDC_CLASH_STORAGENAME);
2014-11-18 05:13:13 +00:00
ASSERT(pWnd != NULL);
pWnd->SetWindowText(fStorageName);
2007-03-27 17:47:10 +00:00
return CDialog::OnInitDialog();
2007-03-27 17:47:10 +00:00
}
void AddClashDialog::OnSkip(void)
2007-03-27 17:47:10 +00:00
{
fDoRename = false;
CDialog::OnOK();
2007-03-27 17:47:10 +00:00
}
void AddClashDialog::OnRename(void)
2007-03-27 17:47:10 +00:00
{
RenameOverwriteDialog dlg;
2007-03-27 17:47:10 +00:00
dlg.fNewFileSource = fWindowsName;
dlg.fExistingFile = fStorageName;
dlg.fNewName = fStorageName;
if (dlg.DoModal() == IDOK) {
fNewName = dlg.fNewName;
fDoRename = true;
CDialog::OnOK();
}
2007-03-27 17:47:10 +00:00
}