mirror of
https://github.com/fadden/ciderpress.git
synced 2024-06-26 10:29:57 +00:00
This moves method comments from the .cpp file to the .h file, where users of the methods can find them. This also makes it possible for the IDE to show the comments when you mouse-hover over the method name, though Visual Studio is a bit weak in this regard. Also, added "override" keywords on overridden methods. Reasonably current versions of popular compilers seem to support this. Also, don't have the return type on a separate line in the .cpp file. The motivation for the practice -- quickly finding a method definition with "^name" -- is less useful in C++ than C, and modern IDEs provide more convenient ways to do the same thing. Also, do some more conversion from unsigned types to uintXX_t. This commit is primarily for the "app" directory.
68 lines
1.6 KiB
C++
68 lines
1.6 KiB
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
#include "stdafx.h"
|
|
#include "UseSelectionDialog.h"
|
|
#include "HelpTopics.h"
|
|
|
|
BEGIN_MESSAGE_MAP(UseSelectionDialog, CDialog)
|
|
ON_WM_HELPINFO()
|
|
//ON_COMMAND(IDHELP, OnHelp)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
BOOL UseSelectionDialog::OnInitDialog(void)
|
|
{
|
|
CString str;
|
|
CString selStr;
|
|
CWnd* pWnd;
|
|
|
|
CDialog::OnInitDialog();
|
|
|
|
/* grab the radio button with the selection count */
|
|
pWnd = GetDlgItem(IDC_USE_SELECTED);
|
|
ASSERT(pWnd != NULL);
|
|
|
|
/* set the string using a string table entry */
|
|
if (fSelectedCount == 1) {
|
|
str.LoadString(fSelCountID);
|
|
pWnd->SetWindowText(str);
|
|
} else {
|
|
str.LoadString(fSelCountsID);
|
|
selStr.Format((LPCTSTR) str, fSelectedCount);
|
|
pWnd->SetWindowText(selStr);
|
|
|
|
if (fSelectedCount == 0)
|
|
pWnd->EnableWindow(FALSE);
|
|
}
|
|
|
|
/* set the other strings */
|
|
str.LoadString(fTitleID);
|
|
SetWindowText(str);
|
|
|
|
pWnd = GetDlgItem(IDC_USE_ALL);
|
|
ASSERT(pWnd != NULL);
|
|
str.LoadString(fAllID);
|
|
pWnd->SetWindowText(str);
|
|
|
|
pWnd = GetDlgItem(IDOK);
|
|
ASSERT(pWnd != NULL);
|
|
str.LoadString(fOkLabelID);
|
|
pWnd->SetWindowText(str);
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void UseSelectionDialog::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
DDX_Radio(pDX, IDC_USE_SELECTED, fFilesToAction);
|
|
}
|
|
|
|
BOOL UseSelectionDialog::OnHelpInfo(HELPINFO* lpHelpInfo)
|
|
{
|
|
WinHelp((DWORD) lpHelpInfo->iCtrlId, HELP_CONTEXTPOPUP);
|
|
return TRUE; // yes, we handled it
|
|
}
|