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 "UseSelectionDialog.h"
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(UseSelectionDialog, CDialog)
|
2014-11-04 00:26:53 +00:00
|
|
|
ON_WM_HELPINFO()
|
|
|
|
//ON_COMMAND(IDHELP, OnHelp)
|
2007-03-27 17:47:10 +00:00
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
BOOL UseSelectionDialog::OnInitDialog(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
CString str;
|
|
|
|
CString selStr;
|
|
|
|
CWnd* pWnd;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
CDialog::OnInitDialog();
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
/* grab the radio button with the selection count */
|
|
|
|
pWnd = GetDlgItem(IDC_USE_SELECTED);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
/* set the string using a string table entry */
|
|
|
|
if (fSelectedCount == 1) {
|
2014-12-16 19:04:31 +00:00
|
|
|
CheckedLoadString(&str, fSelCountID);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(str);
|
|
|
|
} else {
|
2014-12-16 19:04:31 +00:00
|
|
|
CheckedLoadString(&str, fSelCountsID);
|
2014-11-25 22:34:14 +00:00
|
|
|
selStr.Format((LPCWSTR) str, fSelectedCount);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(selStr);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
if (fSelectedCount == 0)
|
|
|
|
pWnd->EnableWindow(FALSE);
|
|
|
|
}
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
/* set the other strings */
|
2014-12-16 19:04:31 +00:00
|
|
|
CheckedLoadString(&str, fTitleID);
|
2014-11-04 00:26:53 +00:00
|
|
|
SetWindowText(str);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd = GetDlgItem(IDC_USE_ALL);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-12-16 19:04:31 +00:00
|
|
|
CheckedLoadString(&str, fAllID);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(str);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd = GetDlgItem(IDOK);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-12-16 19:04:31 +00:00
|
|
|
CheckedLoadString(&str, fOkLabelID);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(str);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
return TRUE;
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void UseSelectionDialog::DoDataExchange(CDataExchange* pDX)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
DDX_Radio(pDX, IDC_USE_SELECTED, fFilesToAction);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|