#ifndef CONFIGDLG_H_B900CA7A_8C0A_4665_B5B7_AD9DAC923757
#define CONFIGDLG_H_B900CA7A_8C0A_4665_B5B7_AD9DAC923757
/**
* \file DlgMixin.h
*
* \brief Header file for template class CDlgMixin
*
* $Id: DlgMixin.h, v1.1.1.1 2006/09/24 23:12:29 mgh Exp $
*
*
* Copyright (C) 2006 Michael G. Herstine <sp1ff@pobox.com>
*
* Permission to use, copy, or modify this source code is hereby granted
* free of charge, provided that this copyright notice appear on all
* copies and on all source code derived from this code. No
* representation is made regarding the suitability of this software for
* any purpose. It is provided "as is" without express or implied
* warranty.
*
*
*/
////////////////////////////////////////////////////////////////////////////
// Modified by Jordan Walters, 01.03.2008 for multi-IDE version increment //
////////////////////////////////////////////////////////////////////////////
#ifndef DLGMIXIN_H_9C889376_DB3D_465B_8B7A_E4F0D0DAF90F
#include "DlgMixin.h" // For base class CDlgMixin
#endif // not "DlgMixin.h"
#ifndef RESOURCE_H_INCLUDED
#include "Resource.h" // Resource definitions
#define RESOURCE_H_INCLUDED
#endif // not "Resource.h"
/**
* \class CConfigDlg
*
* \brief Dialog class for AddIns that can't integrate into their host's
* property sheet
*
* \sa CDlgMixin, CPropPageCtl
*
*
* Some of the applications that may host this AddIn permit us to
* integrate one or more property pages into their Tools | Options
* property sheets, others do not. For those that do not, we implement
* our own configuration dialog box.
*
* Note that we subclass CDlgMixin to pick up implementation code common
* to both this, our stand-alone dialog implementation, and
* CPropPageCtl, our composite control.
*
*
*/
class CConfigDlg:
public CDlgMixin<CConfigDlg>,
public CDialogImpl<CConfigDlg>
{
public:
/// Resource ID -- name required by CDialogImpl
static const UINT IDD = IDD_CONFIG;
public:
/// Construct with the current digit
CConfigDlg();
~CConfigDlg();
/// Used by CDlgMixin
DWORD getDigit() const
{ return m_dwDigit; }
bool getResetLowerVersions() const
{ return m_bResetLowerVersions; }
bool getRevertToBuildNumber() const
{ return m_bRevertToBuildNumber; }
/// Used by CDlgMixin
void setDigit(const DWORD dwDigit)
{ m_dwDigit = dwDigit; }
void setResetLowerVersions(const bool bResetLowerVersions)
{ m_bResetLowerVersions = bResetLowerVersions; }
void setRevertToBuildNumber(const bool bRevertToBuildNumber)
{ m_bRevertToBuildNumber = bRevertToBuildNumber; }
#ifndef DOXYGEN_INVOKED // Shield the macros from doxygen...
BEGIN_MSG_MAP(CConfigDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
COMMAND_HANDLER(IDC_RADIO_MAJ, BN_CLICKED, OnClickedVersion)
COMMAND_HANDLER(IDC_RADIO_MIN, BN_CLICKED, OnClickedVersion)
COMMAND_HANDLER(IDC_RADIO_REV, BN_CLICKED, OnClickedVersion)
COMMAND_HANDLER(IDC_RADIO_BLD, BN_CLICKED, OnClickedVersion)
COMMAND_HANDLER(IDC_STATIC_MAJ, BN_CLICKED, OnClickedStatusMajorVersion)
COMMAND_HANDLER(IDC_STATIC_MIN, BN_CLICKED, OnClickedStatusMinorVersion)
COMMAND_HANDLER(IDC_STATIC_REV, BN_CLICKED, OnClickedStatusRevision)
COMMAND_HANDLER(IDC_STATIC_BLD, BN_CLICKED, OnClickedStatusBuildNumber)
CHAIN_MSG_MAP(CDlgMixin<CConfigDlg>)
END_MSG_MAP()
#endif // not DOXYGEN_INVOKED
public:
/// WM_INITDIALOG handler
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
/// BN_CLICKED handler for IDOK
LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
/// BN_CLICKED handler for IDCANCEL
LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
/// BN_CLICKED handler for IDC_RADIO_MAJ, IDC_RADIO_MIN, IDC_RADIO_REV or IDC_RADIO_BLD
LRESULT OnClickedVersion(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
/// BN_CLICKED handlers for IDC_STATIC_MAJ, IDC_STATIC_MIN, IDC_STATIC_REV or IDC_STATIC_BLD
LRESULT OnClickedStatusMajorVersion(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
LRESULT OnClickedStatusMinorVersion(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
LRESULT OnClickedStatusRevision(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
LRESULT OnClickedStatusBuildNumber(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
private:
/// Temporary store for the choice of version digit to increment
// -- written to Registry on IDOK
DWORD m_dwDigit;
bool m_bResetLowerVersions;
bool m_bRevertToBuildNumber;
}; // End class CConfigDlg.
// Local Variables:
// fill-column: 72
// indent-tabs-mode: nil
// show-trailing-whitespace: t
// End:
#endif // CONFIGDLG_H_B900CA7A_8C0A_4665_B5B7_AD9DAC923757