/** * @file XTPCalendarOccurSeriesChooseDlg.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ #ifndef _XTPCALENDAROCCURSERIESCHOOSEDLG_H__ #define _XTPCALENDAROCCURSERIESCHOOSEDLG_H__ #if _MSC_VER > 1000 # pragma once #endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// #include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPCalendarEvent; /** * @brief * This class implements a dialog to choose between current occurrence and * whole recurrence event series (or pattern). * * @details * This is useful in operations with events like edit or delete event. * The dialog items inscriptions are customizable and loaded from resources. */ class _XTP_EXT_CLASS CXTPCalendarOccurSeriesChooseDlg : public CDialog { public: enum { IDD = XTP_IDD_CALENDAR_DIALOG_OCURR_SERIES }; /** * @brief * Default object constructor. * * @param pParent Pointer to the parent window. * @param nIDResourceLabels Dialog labels string resource ID. * @param lpszResourceIcon Dialog icon resource ID. * @param nIDTemplate [in] Contains the ID number of a dialog-box template resource. * * @details * The string format for nIDResourceLabels is: * "Title\\nOccurrence\\nSeries\\nMessage" * Where: * * Title - Dialog window title text. * * Occurrence - Occurrence radio button label. * * Series - Series radio button label. * * Message - Dialog message text. If message string has %s * format specifier - event subject is inserted * instead. See SetEvent() method. * * @see ~CXTPCalendarEvent() */ CXTPCalendarOccurSeriesChooseDlg(CWnd* pParent, UINT nIDResourceLabels, LPCTSTR lpszResourceIcon = IDI_EXCLAMATION, UINT nIDTemplate = CXTPCalendarOccurSeriesChooseDlg::IDD); /** * @brief * Default class destructor. */ virtual ~CXTPCalendarOccurSeriesChooseDlg(); public: /** * @brief * Update dialog information from the specified event. * * @param pEvent Pointer to the calendar event object. * * @details * If message string has %s format specifier - event subject is * inserted instead by default. */ virtual void SetEvent(CXTPCalendarEvent* pEvent); BOOL m_bOccur; /**< [in/out] Contain default/selected choice. If TRUE - occurrence is selected, otherwise series.*/ protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual BOOL OnInitDialog(); virtual void OnOK(); /** @cond */ DECLARE_MESSAGE_MAP() /** @endcond */ protected: CStatic m_ctrlMessage; /**< Dialog message text control. */ CStatic m_ctrlIcon; /**< Dialog icon control. */ CButton m_ctrlOccur; /**< Occurrence radio button control. */ CButton m_ctrlSeries; /**< Series radio button control. */ CString m_strTitle; /**< Dialog title string. */ CString m_strMessage; /**< Dialog message text prepared string. */ CString m_strOccur; /**< Occurrence radio button label text string. */ CString m_strSeries; /**< Series radio button label text string. */ UINT m_nIDResourceLabels; /**< Dialog labels string resource ID.*/ HICON m_hIcon; /**< Dialog icon resource ID.*/ }; #include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // _XTPCALENDAROCCURSERIESCHOOSEDLG_H__