XTPCalendarNotifications.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:51k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // XTPCalendarNotifications.h: unique notifications identifiers for
  2. // CXTPCalendarControl class.
  3. //
  4. // This file is a part of the XTREME CALENDAR MFC class library.
  5. // (c)1998-2008 Codejock Software, All Rights Reserved.
  6. //
  7. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  8. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  9. // CONSENT OF CODEJOCK SOFTWARE.
  10. //
  11. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  12. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  13. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  14. // SINGLE COMPUTER.
  15. //
  16. // CONTACT INFORMATION:
  17. // support@codejock.com
  18. // http://www.codejock.com
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. //{{AFX_CODEJOCK_PRIVATE
  22. #if !defined(_XTPCalendarNotifications_H__)
  23. #define _XTPCalendarNotifications_H__
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. //}}AFX_CODEJOCK_PRIVATE
  28. /////////////////////////////////////////////////////////////////////////////
  29. #include "Common/XTPNotifyConnection.h"
  30. #include "XTPCalendarDefines.h"
  31. class CXTPCalendarViewEvents;
  32. class CXTPCalendarDayViewGroup;
  33. //## *** CXTPCalendarData notification IDs ***
  34. //---------------------------------------------------------------------------
  35. // Summary: New event has just been added to the data provider.
  36. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  37. // Remarks: <b>Parameters</b> - wParam = EventID, lParam = CXTPCalendarEvent*
  38. //---------------------------------------------------------------------------
  39. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAREVENTWASADDED    = (WM_XTP_CALENDAR_BASE + 1);
  40. //---------------------------------------------------------------------------
  41. // Summary: Event has just been deleted from the data provider.
  42. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  43. // Remarks: <b>Parameters</b> - wParam = EventID, lParam = CXTPCalendarEvent*
  44. //---------------------------------------------------------------------------
  45. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAREVENTWASDELETED = (WM_XTP_CALENDAR_BASE + 2);
  46. //---------------------------------------------------------------------------
  47. // Summary: Event has just been changed in the data provider.
  48. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  49. // Remarks: <b>Parameters</b> - wParam = EventID, lParam = CXTPCalendarEvent*
  50. //---------------------------------------------------------------------------
  51. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAREVENTWASCHANGED = (WM_XTP_CALENDAR_BASE + 3);
  52. //{{AFX_CODEJOCK_PRIVATE
  53. //
  54. // ***
  55. // These handlers are remain for compatibility with previous versions.
  56. // In new versions XTP_NC_CALENDAREVENTWASxxx should be used instead.
  57. // Pattern can be retrieved from lParam = CXTPCalendarEvent*
  58. // ***
  59. //
  60. //---------------------------------------------------------------------------
  61. // Summary: New recurrence pattern has just been added to the data provider.
  62. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  63. // Remarks: <b>Parameters</b>   - wParam = RatternID, lParam = 0
  64. //---------------------------------------------------------------------------
  65. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARPATTERNWASADDED   = (WM_XTP_CALENDAR_BASE + 4);
  66. //---------------------------------------------------------------------------
  67. // Summary: Recurrence pattern has just been deleted from the data provider.
  68. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  69. // Remarks: <b>Parameters</b>   - wParam = RatternID, lParam = 0
  70. //---------------------------------------------------------------------------
  71. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARPATTERNWASDELETED = (WM_XTP_CALENDAR_BASE + 5);
  72. //---------------------------------------------------------------------------
  73. // Summary: Recurrence pattern has just been changed in the data provider.
  74. //          <b>Sender</b> - CXTPCalendarData, CXTPCalendarControl
  75. // Remarks: <b>Parameters</b>   - wParam = RatternID, lParam = 0
  76. //---------------------------------------------------------------------------
  77. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARPATTERNWASCHANGED = (WM_XTP_CALENDAR_BASE + 6);
  78. //}}AFX_CODEJOCK_PRIVATE
  79. /////////////////////////////////////////////////////////////////////////////
  80. //---------------------------------------------------------------------------
  81. // Summary: Current Calendar Control view type(day, week, ...) or content
  82. //          was changed.
  83. //          <b>Sender</b> - CXTPCalendarControl
  84. // Remarks: <b>Parameters</b>   - wParam = 0, lParam = 0
  85. //---------------------------------------------------------------------------
  86. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARVIEWWASCHANGED = (WM_XTP_CALENDAR_BASE + 7);
  87. /////////////////////////////////////////////////////////////////////////////
  88. //---------------------------------------------------------------------------
  89. // Summary: A Context Menu should be displayed for the Calendar Control.
  90. //          <b>Sender</b> - CXTPCalendarControl
  91. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  92. //---------------------------------------------------------------------------
  93. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARCONTEXTMENU  = (WM_XTP_CALENDAR_BASE + 8);
  94. //---------------------------------------------------------------------------
  95. // Summary: On LButtonDown event.
  96. //          <b>Sender</b> - CXTPCalendarControl
  97. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  98. //---------------------------------------------------------------------------
  99. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARLBUTTONDOWN  = (WM_XTP_CALENDAR_BASE + 9);
  100. //---------------------------------------------------------------------------
  101. // Summary: On LButtonDblClick event.
  102. //          <b>Sender</b> - CXTPCalendarControl
  103. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  104. //---------------------------------------------------------------------------
  105. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARLBUTTONDBLCLICK = (WM_XTP_CALENDAR_BASE + 10);
  106. //---------------------------------------------------------------------------
  107. // Summary: On LButtonUp event.
  108. //          <b>Sender</b> - CXTPCalendarControl
  109. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  110. //---------------------------------------------------------------------------
  111. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARLBUTTONUP    = (WM_XTP_CALENDAR_BASE + 11);
  112. //---------------------------------------------------------------------------
  113. // Summary: On MouseMove event.
  114. //          <b>Sender</b> - CXTPCalendarControl
  115. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  116. //---------------------------------------------------------------------------
  117. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARMOUSEMOVE    = (WM_XTP_CALENDAR_BASE + 12);
  118. //---------------------------------------------------------------------------
  119. // Summary: On KeyDown event.
  120. //          <b>Sender</b> - CXTPCalendarControl
  121. // Remarks: <b>Parameters</b> - wParam = 'key was pressed', lParam = 0
  122. //---------------------------------------------------------------------------
  123. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARKEYDOWN    = (WM_XTP_CALENDAR_BASE + 13);
  124. //---------------------------------------------------------------------------
  125. // Summary: On RButtonDown event.
  126. //          <b>Sender</b> - CXTPCalendarControl
  127. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  128. //---------------------------------------------------------------------------
  129. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARRBUTTONDOWN  = (WM_XTP_CALENDAR_BASE + 14);
  130. //---------------------------------------------------------------------------
  131. // Summary: Calendar Control Day view time scale was changed.
  132. //          <b>Sender</b> - CXTPCalendarControl
  133. // Remarks: <b>Parameters</b>   - wParam = 0, lParam = 0
  134. //---------------------------------------------------------------------------
  135. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARVIEWTIMESCALEWASCHANGED = (WM_XTP_CALENDAR_BASE + 15);
  136. //---------------------------------------------------------------------------
  137. // Summary: Calendar Control options was changed.
  138. //          <b>Sender</b> - CXTPCalendarControl
  139. // Remarks: <b>Parameters</b>
  140. //                  wParam = -1 or XTPCalendarViewType enum value.
  141. //                           Specify global option (-1) or which kind of view
  142. //                           changed option is related.
  143. //                  lParam = 0
  144. //---------------------------------------------------------------------------
  145. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAROPTIONSWASCHANGED = (WM_XTP_CALENDAR_BASE + 16);
  146. //---------------------------------------------------------------------------
  147. // Summary: Calendar Control data provider (resources) where changed.
  148. //          SetDataProvider() or SetResources() methods where called.
  149. //          <b>Sender</b> - CXTPCalendarControl, CXTPCalendarView.
  150. // Remarks: <b>Parameters</b>   wParam = 0 if Calendar control resources where changed,
  151. //                                       1 when CalendarView resources where changed.
  152. //                                       2 when CalendarViewDay resources where changed.
  153. //                              lParam = NULL if wParam == 0,
  154. //                                       CXTPCalendarView*    if wParam == 1,
  155. //                                       CXTPCalendarViewDay* if wParam == 2.
  156. //---------------------------------------------------------------------------
  157. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARDATAPROVIDERWASCHANGED = (WM_XTP_CALENDAR_BASE + 17);
  158. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_RESOURCES_WHERE_CHANGED  = XTP_NC_CALENDARDATAPROVIDERWASCHANGED; //<COMBINE XTP_NC_CALENDARDATAPROVIDERWASCHANGED>
  159. //---------------------------------------------------------------------------
  160. // Summary: This notification is sent to determine is specified editing operation
  161. //          disabled.
  162. //          <b>Sender</b> - CXTPCalendarControl
  163. // Remarks:
  164. //          This notification may be sent several times before edit operation
  165. //          to update user interface state in the right way (set corresponding
  166. //          mouse cursor for example).
  167. //          The XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION notification is sent
  168. //          only once before edit operation.
  169. //
  170. //          <b>Parameters</b>
  171. //              wParam - [in] A pointer to XTP_EVENT_EDIT_OPERATION_PARAMS structure
  172. //                       or to derived structure depends on eOperation member value.
  173. //              lParam - [out] A pointer to the return result: BOOL*.
  174. //                       Set TRUE if to disable specified editing operation,
  175. //                       otherwise FALSE.
  176. //                       Initial value is FALSE.
  177. // See Also: XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION, XTPCalendarEditOperation,
  178. //           XTP_EVENT_EDIT_OPERATION_PARAMS, XTP_EVENT_PASTE_OPERATION_PARAMS,
  179. //           XTP_EVENT_IN_PLACE_CREATE_EVENT_OPERATION_PARAMS
  180. //---------------------------------------------------------------------------
  181. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED = (WM_XTP_CALENDAR_BASE + 18);
  182. //---------------------------------------------------------------------------
  183. // Summary: This notification is sent to customize or disable specified editing
  184. //           operation.
  185. //          <b>Sender</b> - CXTPCalendarControl
  186. // Remarks:
  187. //          This notification is sent only once before edit operation.
  188. //          The XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION notification is sent
  189. //          every time before this notification.
  190. //
  191. //          <b>Parameters</b>
  192. //              wParam - [in] A pointer to XTP_EVENT_EDIT_OPERATION_PARAMS structure
  193. //                       or to derived structure depends on eOperation member value.
  194. //              lParam - [out] A pointer to the return result: BOOL*.
  195. //                       Set TRUE if specified editing operation is handled,
  196. //                       otherwise FALSE.
  197. //                       Initial value is FALSE.
  198. // See Also: XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED, XTPCalendarEditOperation,
  199. //           XTP_EVENT_EDIT_OPERATION_PARAMS, XTP_EVENT_PASTE_OPERATION_PARAMS,
  200. //           XTP_EVENT_IN_PLACE_CREATE_EVENT_OPERATION_PARAMS
  201. //---------------------------------------------------------------------------
  202. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION = (WM_XTP_CALENDAR_BASE + 19);
  203. //===========================================================================
  204. // Summary:
  205. //     Enumerates customizable event edit operations.
  206. //===========================================================================
  207. enum XTPCalendarEditOperation
  208. {
  209. xtpCalendarEO_Unknown           = 0,    // Unknown operation value.
  210. xtpCalendarEO_DragCopy          = xtpCalendaDragModeCopy,       // Drag copy event.
  211. xtpCalendarEO_DragMove          = xtpCalendaDragModeMove,       // Drag move event
  212. xtpCalendarEO_DragResizeBegin   = xtpCalendaDragModeResizeBegin, // Drag Resizing event begin.
  213. xtpCalendarEO_DragResizeEnd     = xtpCalendaDragModeResizeEnd,  // Drag Resizing event end.
  214. xtpCalendarEO_EditSubject_ByF2,             // In-place edit event subject by F2.
  215. xtpCalendarEO_EditSubject_ByMouseClick,     // In-place edit event subject by Mouse Click.
  216. xtpCalendarEO_EditSubject_ByTab,            // In-place edit event subject by TAB.
  217. xtpCalendarEO_EditSubject_AfterEventResize, // In-place edit event subject after event resize.
  218. xtpCalendarEO_Cut,      // Cut events
  219. xtpCalendarEO_Copy,     // Copy events
  220. xtpCalendarEO_Paste,    // Paste event. wParam = XTP_EVENT_PASTE_OPERATION_PARAMS*. pEventViews member is NULL.
  221. xtpCalendarEO_DeleteSelectedEvents, // Delete selected events.
  222. xtpCalendarEO_DeleteEvent,          // Delete event. Sent for a single event or for each selected event.
  223. xtpCalendarEO_InPlaceCreateEvent    // In-place event creation.
  224. };
  225. //---------------------------------------------------------------------------
  226. // Summary: This structure is used as a generic and base class for customize
  227. //          edit event notifications.
  228. // See Also: XTPCalendarEditOperation,
  229. //           XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED,
  230. //           XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION,
  231. //           XTP_EVENT_PASTE_OPERATION_PARAMS,
  232. //           XTP_EVENT_IN_PLACE_CREATE_EVENT_OPERATION_PARAMS
  233. //---------------------------------------------------------------------------
  234. struct XTP_EVENT_EDIT_OPERATION_PARAMS
  235. {
  236. XTPCalendarEditOperation    eOperation;     // Edit operation.
  237. CXTPCalendarViewEvents* pEventViews;    // Event views array with events set for edit operation.
  238. };
  239. //---------------------------------------------------------------------------
  240. // Summary: This structure is with notifications for customize edit event
  241. //          notifications when <b>eOperation</b> is <b>xtpCalendarEO_Paste</b>.
  242. // See Also: XTPCalendarEditOperation,
  243. //           XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED,
  244. //           XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION,
  245. //           XTP_EVENT_EDIT_OPERATION_PARAMS
  246. //---------------------------------------------------------------------------
  247. struct XTP_EVENT_PASTE_OPERATION_PARAMS : public XTP_EVENT_EDIT_OPERATION_PARAMS
  248. {
  249. CXTPCalendarEvent*  pEvent;                         // A pointer to event prepared for paste.
  250. BOOL                bPasteWillChangeExistingEvent;  // If this member is TRUE, the new event will not be added, just existing event will be updated. Used for creating recurrence event exceptions by cut operation.
  251. };
  252. //---------------------------------------------------------------------------
  253. // Summary: This structure is with notifications for customize edit event
  254. //          notifications when <b>eOperation</b> is <b>xtpCalendarEO_InPlaceCreateEvent</b>.
  255. // See Also: XTPCalendarEditOperation,
  256. //           XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED,
  257. //           XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION,
  258. //           XTP_EVENT_EDIT_OPERATION_PARAMS
  259. //---------------------------------------------------------------------------
  260. struct XTP_EVENT_IN_PLACE_CREATE_EVENT_OPERATION_PARAMS : public XTP_EVENT_EDIT_OPERATION_PARAMS
  261. {
  262. LPCTSTR pcszInitialSubject; // A pointer to the string which contains initial subject value for new event (generally initial char).
  263. };
  264. //---------------------------------------------------------------------------
  265. // Summary: This structure is with notifications for customize edit event
  266. //          notifications when <b>eOperation</b> is <b>xtpCalendarEO_DragXXX</b>.
  267. // Remarks:
  268. //          Used only with XTP_NC_CALENDAR_IS_EVENT_EDIT_OPERATION_DISABLED
  269. //          notification.
  270. // See Also: XTPCalendarEditOperation,
  271. //           XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION,
  272. //           XTP_EVENT_EDIT_OPERATION_PARAMS
  273. //---------------------------------------------------------------------------
  274. struct XTP_EVENT_DRAG_OPERATION_PARAMS : public XTP_EVENT_EDIT_OPERATION_PARAMS
  275. {
  276. CXTPCalendarEvent* pDraggingEvent;      // A pointer to event before dragging operation.
  277. CXTPCalendarEvent* pDraggingEventNew;   // A pointer to event after dragging operation.
  278. };
  279. //===========================================================================
  280. // Summary:
  281. //     Enumerates calendar selection types.
  282. //===========================================================================
  283. enum XTPCalendarSelectionChanged
  284. {
  285. xtpCalendarSelectionUnknown = 0,    // Unknown selection value.
  286. xtpCalendarSelectionDays    = 1,    // Days (or day hours for day view) selection. Use GetSelection() method to retrieve current selection.
  287. xtpCalendarSelectionEvents  = 2     // Events selection. Use GetSelectedViewEvents() and GetSelectedEvents() methods to retrieve currently selected events.
  288. };
  289. //---------------------------------------------------------------------------
  290. // Summary: This notification is sent when selection is changed.
  291. //          <b>Sender</b> - CXTPCalendarControl
  292. // Remarks:
  293. //          <b>Parameters</b>
  294. //              wParam - [in] A value from XTPCalendarSelectionChanged
  295. //                       enum.
  296. //              lParam - unused
  297. // See Also: XTPCalendarSelectionChanged
  298. //---------------------------------------------------------------------------
  299. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_SELECTION_CHANGED = (WM_XTP_CALENDAR_BASE + 20);
  300. //---------------------------------------------------------------------------
  301. // Summary: On RButtonUp event.
  302. //          <b>Sender</b> - CXTPCalendarControl
  303. // Remarks: <b>Parameters</b> - wParam = 'Clicked Point', lParam = 0
  304. //---------------------------------------------------------------------------
  305. static const XTP_NOTIFY_CODE   XTP_NC_CALENDARRBUTTONUP  = (WM_XTP_CALENDAR_BASE + 21);
  306. //---------------------------------------------------------------------------
  307. // Summary: Enumeration of possible Calendar Reminder notification actions.
  308. // Remarks: Members of this enumerations are used as an additional parameters
  309. //          of the XTP_NC_CALENDAR_ON_REMINDERS notification
  310. // See Also: XTP_NC_CALENDAR_ON_REMINDERS notification
  311. //---------------------------------------------------------------------------
  312. enum XTPCalendarRemindersAction
  313. {
  314. xtpCalendarRemindersMonitoringStarted   = 1, // Sends after monitoring has started (end of executing CXTPCalendarRemindersManager::StartMonitoring)
  315. xtpCalendarRemindersMonitoringStopped   = 2, // Sends when monitoring has stopped (CXTPCalendarRemindersManager::StopMonitoring)
  316. xtpCalendarRemindersFire                = 3, // Main notification, when reminder is executed.
  317. xtpCalendarReminderSnoozed              = 4, // When 1 pending reminder was snoozed. lParam = CXTPCalendarReminder*
  318. xtpCalendarReminderDismissed            = 5, // When 1 pending reminder was dismissed. lParam = CXTPCalendarReminder*
  319. xtpCalendarReminderDismissedAll         = 6  // When all pending reminders were dismissed.
  320. };
  321. //---------------------------------------------------------------------------
  322. // Summary: On RButtonUp event.
  323. //          <b>Sender</b> - CXTPCalendarRemindersManager
  324. // Remarks: <b>Parameters</b> - wParam = XTPCalendarRemindersAction, lParam = 0 or CXTPCalendarReminder*. See XTPCalendarRemindersAction.
  325. //---------------------------------------------------------------------------
  326. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_ON_REMINDERS = (WM_XTP_CALENDAR_BASE + 22);
  327. //---------------------------------------------------------------------------
  328. // Summary: Doubled custom parameter for notifications.
  329. //          Used when single WPARAM is not enough.
  330. // See Also: WPARAM
  331. //---------------------------------------------------------------------------
  332. struct XTP_CALENDAR_WPARAM2
  333. {
  334. WPARAM wParam1;         // First custom parameter
  335. WPARAM wParam2;         // Second custom parameter
  336. };
  337. //---------------------------------------------------------------------------
  338. // Summary:  This notification is used as analog of overridable method
  339. //           CXTPCalendarData::DoRetrieveDayEvents.
  340. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  341. // Remarks:
  342. //           Send by a custom data provider. Calendar control reflects this
  343. //           notification as well as other notifications.
  344. //      <b>Parameters</b>
  345. //           wParam - [in] A day date as XTP_DATE_VALUE;
  346. //           lParam - [in/out] A pointer to pointer to events array
  347. //                    as CXTPCalendarEventsPtr*;
  348. //
  349. // See Also: CXTPCalendarCustomDataProvider::DoRetrieveDayEvents
  350. //---------------------------------------------------------------------------
  351. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoRetrieveDayEvents = (WM_XTP_CALENDAR_BASE + 23);
  352. //---------------------------------------------------------------------------
  353. // Summary:  This notification is used as analog of overridable method
  354. //           CXTPCalendarData::DoRemoveAllEvents.
  355. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  356. // Remarks:
  357. //           Send by a custom data provider. Calendar control reflects this
  358. //           notification as well as other notifications.
  359. //
  360. // See Also: CXTPCalendarCustomDataProvider::DoRemoveAllEvents
  361. //---------------------------------------------------------------------------
  362. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoRemoveAllEvents = (WM_XTP_CALENDAR_BASE + 24);
  363. //---------------------------------------------------------------------------
  364. // Summary:  This notification is used as analog of overridable method
  365. //           CXTPCalendarData::DoRead_Event.
  366. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  367. // Remarks:
  368. //           Send by a custom data provider. Calendar control reflects this
  369. //           notification as well as other notifications.
  370. //      <b>Parameters</b>
  371. //           wParam - [in] An event ID to read as DWORD;
  372. //           lParam - [in/out] A pointer to pointer to event
  373. //                    as CXTPCalendarEventPtr*;
  374. //
  375. // See Also: CXTPCalendarCustomDataProvider::DoRead_Event
  376. //---------------------------------------------------------------------------
  377. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoRead_Event = (WM_XTP_CALENDAR_BASE + 25);
  378. //---------------------------------------------------------------------------
  379. // Summary:  This notification is used as analog of overridable method
  380. //           CXTPCalendarData::DoRead_RPattern.
  381. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  382. // Remarks:
  383. //           Send by a custom data provider. Calendar control reflects this
  384. //           notification as well as other notifications.
  385. //      <b>Parameters</b>
  386. //           wParam - [in] An recurrence pattern ID to read as DWORD;
  387. //           lParam - [in/out] A pointer to pointer to recurrence pattern
  388. //                    as CXTPCalendarRecurrencePatternPtr*;
  389. //
  390. // See Also: CXTPCalendarCustomDataProvider::DoRead_RPattern
  391. //---------------------------------------------------------------------------
  392. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoRead_RPattern = (WM_XTP_CALENDAR_BASE + 26);
  393. //---------------------------------------------------------------------------
  394. // Summary:  This notification is used as analog of overridable method
  395. //           CXTPCalendarData::DoCreate_Event.
  396. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  397. // Remarks:
  398. //           Send by a custom data provider. Calendar control reflects this
  399. //           notification as well as other notifications.
  400. //  <b>Parameters</b>
  401. //           wParam - [in] A pointer as XTP_CALENDAR_WPARAM2* where :
  402. //                    wParam1 - [in] A pointer to calendar event object
  403. //                              as CXTPCalendarEvent*;
  404. //                    wParam2 - [out] A pointer to newly created event ID as DWORD*;
  405. //           lParam - [out] A pointer to result of operation as BOOL*;
  406. //
  407. // See Also: CXTPCalendarCustomDataProvider::DoCreate_Event
  408. //---------------------------------------------------------------------------
  409. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoCreate_Event = (WM_XTP_CALENDAR_BASE + 27);
  410. //---------------------------------------------------------------------------
  411. // Summary:  This notification is used as analog of overridable method
  412. //           CXTPCalendarData::DoUpdate_Event.
  413. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  414. // Remarks:
  415. //           Send by a custom data provider. Calendar control reflects this
  416. //           notification as well as other notifications.
  417. //  <b>Parameters</b>
  418. //           wParam - [in] A pointer to calendar event object as CXTPCalendarEvent*;
  419. //           lParam - [out] A pointer to result of operation as BOOL*;
  420. //
  421. // See Also: CXTPCalendarCustomDataProvider::DoUpdate_Event
  422. //---------------------------------------------------------------------------
  423. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoUpdate_Event = (WM_XTP_CALENDAR_BASE + 28);
  424. //---------------------------------------------------------------------------
  425. // Summary:  This notification is used as analog of overridable method
  426. //           CXTPCalendarData::DoDelete_Event.
  427. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  428. // Remarks:
  429. //           Send by a custom data provider. Calendar control reflects this
  430. //           notification as well as other notifications.
  431. //  <b>Parameters</b>
  432. //           wParam - [in] A pointer to calendar event object as CXTPCalendarEvent*;
  433. //           lParam - [out] A pointer to result of operation as BOOL*;
  434. //
  435. // See Also: CXTPCalendarCustomDataProvider::DoDelete_Event
  436. //---------------------------------------------------------------------------
  437. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoDelete_Event = (WM_XTP_CALENDAR_BASE + 29);
  438. //---------------------------------------------------------------------------
  439. // Summary:  This notification is used as analog of overridable method
  440. //           CXTPCalendarData::DoCreate_RPattern.
  441. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  442. // Remarks:
  443. //           Send by a custom data provider. Calendar control reflects this
  444. //           notification as well as other notifications.
  445. //  <b>Parameters</b>
  446. //           wParam - [in] A pointer as XTP_CALENDAR_WPARAM2* where :
  447. //                    wParam1 - [in] A pointer to recurrence pattern object
  448. //                              as CXTPCalendarRecurrencePattern*;
  449. //                    wParam2 - [out] A pointer to newly created
  450. //                              recurrence pattern ID as DWORD*;
  451. //           lParam - [out] A pointer to result of operation as BOOL*;
  452. //
  453. // See Also: CXTPCalendarCustomDataProvider::DoCreate_RPattern
  454. //---------------------------------------------------------------------------
  455. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoCreate_RPattern = (WM_XTP_CALENDAR_BASE + 30);
  456. //---------------------------------------------------------------------------
  457. // Summary:  This notification is used as analog of overridable method
  458. //           CXTPCalendarData::DoUpdate_RPattern.
  459. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  460. // Remarks:
  461. //           Send by a custom data provider. Calendar control reflects this
  462. //           notification as well as other notifications.
  463. //  <b>Parameters</b>
  464. //           wParam - [in] A pointer to recurrence pattern object
  465. //                         as CXTPCalendarRecurrencePattern*;
  466. //           lParam - [out] A pointer to result of operation as BOOL*;
  467. //
  468. // See Also: CXTPCalendarCustomDataProvider::DoUpdate_RPattern
  469. //---------------------------------------------------------------------------
  470. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoUpdate_RPattern = (WM_XTP_CALENDAR_BASE + 31);
  471. //---------------------------------------------------------------------------
  472. // Summary:  This notification is used as analog of overridable method
  473. //           CXTPCalendarData::DoDelete_RPattern.
  474. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  475. // Remarks:
  476. //           Send by a custom data provider. Calendar control reflects this
  477. //           notification as well as other notifications.
  478. //  <b>Parameters</b>
  479. //           wParam - [in] A pointer to recurrence pattern object
  480. //                         as CXTPCalendarRecurrencePattern*;
  481. //           lParam - [out] A pointer to result of operation as BOOL*;
  482. //
  483. // See Also: CXTPCalendarCustomDataProvider::DoDelete_RPattern
  484. //---------------------------------------------------------------------------
  485. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoDelete_RPattern = (WM_XTP_CALENDAR_BASE + 32);
  486. //---------------------------------------------------------------------------
  487. // Summary:  This notification is used as analog of overridable method
  488. //           CXTPCalendarData::DoGetAllEvents_raw.
  489. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  490. // Remarks:
  491. //           Send by a custom data provider. Calendar control reflects this
  492. //           notification as well as other notifications.
  493. //  <b>Parameters</b>
  494. //           wParam - Unused (=0);
  495. //           lParam - [in/out] A pointer to pointer to events array
  496. //                    as CXTPCalendarEventsPtr*;
  497. //
  498. // See Also: CXTPCalendarCustomDataProvider::DoGetAllEvents_raw
  499. //---------------------------------------------------------------------------
  500. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoGetAllEvents_raw = (WM_XTP_CALENDAR_BASE + 33);
  501. //---------------------------------------------------------------------------
  502. // Summary:  This notification is used as analog of overridable method
  503. //           CXTPCalendarData::DoGetUpcomingEvents.
  504. //           <b>Sender</b> - CXTPCalendarCustomDataProvider, CXTPCalendarControl.
  505. // Remarks:
  506. //           Send by a custom data provider. Calendar control reflects this
  507. //           notification as well as other notifications.
  508. //  <b>Parameters</b>
  509. //           wParam - [in] A pointer as XTP_CALENDAR_WPARAM2* where :
  510. //                    wParam1 - [in] As COleDateTime*; Start date and time
  511. //                              of a specified period;
  512. //                    wParam2 - [in] As COleDateTimeSpan*; A duration of a
  513. //                              specified period;
  514. //           lParam - [in/out] A pointer to pointer to events array
  515. //                    as CXTPCalendarEventsPtr*;
  516. //
  517. // See Also: CXTPCalendarCustomDataProvider::DoGetUpcomingEvents
  518. //---------------------------------------------------------------------------
  519. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_DoGetUpcomingEvents = (WM_XTP_CALENDAR_BASE + 34);
  520. //---------------------------------------------------------------------------
  521. // Summary: This notification is sent when selection is changed.
  522. //          <b>Sender</b> - CXTPCalendarControl
  523. // Remarks:
  524. //          <b>Parameters</b>
  525. //              wParam - [in] CXTPCalendarViewGroup* - A pointer to Group View.
  526. //              lParam - [in/out] CString* pointer to caption string.
  527. // See Also: CXTPCalendarViewGroup::GetCaption
  528. //---------------------------------------------------------------------------
  529. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_GETGROPVIEWCAPTION = (WM_XTP_CALENDAR_BASE + 35);
  530. //---------------------------------------------------------------------------
  531. // Summary: This notification is sent when calendar is populating.
  532. //          lParam contains events which will be drawn for the group specified
  533. //          by wParam.
  534. //          You may add, remove or modify some events in CXTPCalendarEvents
  535. //          collection.
  536. //
  537. //          <b>Sender</b> - CXTPCalendarControl
  538. // Remarks:
  539. //          <b>Parameters</b>
  540. //              wParam - [in] CXTPCalendarViewGroup* - A pointer to Group View.
  541. //              lParam - [in/out] CXTPCalendarEvents* - A pointer to events array to draw.
  542. // See Also: CXTPCalendarControl::Populate, XTP_NC_CALENDAR_PREPOPULATE_DAY.
  543. //---------------------------------------------------------------------------
  544. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_PREPOPULATE = (WM_XTP_CALENDAR_BASE + 36);
  545. //===========================================================================
  546. // Summary:
  547. //     Set of parameters transferred from calendar items for
  548. //     XTP_NC_CALENDAR_BEFORE_DRAW_DAYVIEWCELL notification.
  549. // Remarks:
  550. //     This structure defines day view cell (exclude all day events area) drawing
  551. //     attributes.
  552. // See Also: XTP_NC_CALENDAR_BEFORE_DRAW_DAYVIEWCELL
  553. //===========================================================================
  554. struct XTP_CALENDAR_DAYVIEWCELL_PARAMS
  555. {
  556. int         nIndex;      // [in] Cell index.
  557. DATE        dtBeginTime; // [in] Begin cell date and time.
  558. BOOL        bSelected;   // [in] Is cell selected.
  559. COLORREF    clrBackgroundColor; // [in/out] Background cell color.
  560. };
  561. //---------------------------------------------------------------------------
  562. // Summary: This notification is sent for each calendar day view cell before draw.
  563. //          You may customize clrBackgroundColor member of provided
  564. //          XTP_CALENDAR_DAYVIEWCELL_PARAMS structure.
  565. //          <b>Sender</b> - CXTPCalendarControl
  566. // Remarks:
  567. //          <b>Parameters</b>
  568. //              wParam - [in] CXTPCalendarViewGroup* - A pointer to Group View.
  569. //              lParam - [in/out] XTP_CALENDAR_DAYVIEWCELL_PARAMS* - A pointer to
  570. //                       cell parameters.
  571. //---------------------------------------------------------------------------
  572. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_BEFORE_DRAW_DAYVIEWCELL = (WM_XTP_CALENDAR_BASE + 37);
  573. //===========================================================================
  574. // Summary:
  575. //     Set of parameters transferred from calendar items for
  576. //     XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT notification.
  577. // Remarks:
  578. //     This structure defines day view cell (exclude all day events area) drawing
  579. //     attributes.
  580. // See Also: XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT
  581. //===========================================================================
  582. struct XTP_CALENDAR_THEME_DAYVIEWCELL_PARAMS
  583. {
  584. int         nIndex;      // [in] Cell index.
  585. DATE        dtBeginTime; // [in] Begin cell date and time.
  586. BOOL        bSelected;   // [in] Is cell selected.
  587. BOOL        bWorkCell;   // [in] The cell is work (or non-work).
  588. CXTPCalendarDayViewGroup* pViewGroup; // [in] Owner group.
  589. };
  590. //===========================================================================
  591. // Summary:
  592. //     Set of parameters transferred from calendar items for
  593. //     XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT notification.
  594. // Remarks:
  595. //     This structure defines day timescale cell drawing
  596. //     attributes.
  597. // See Also: XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT
  598. //===========================================================================
  599. struct XTP_CALENDAR_THEME_DAYVIEWTIMESCALECELL_PARAMS
  600. {
  601. int     nTimeScale;  // [in] Time scale number {1 - main, 2 - additional}
  602. int     nIndex;      // [in] Cell index.
  603. DATE    dtBeginTime; // [in] Begin cell time.
  604. int     nMinutes;    // [in] SubCell Minutes value {0, 5, 10, ...} or -1 for cell hour.
  605. };
  606. //===========================================================================
  607. // Summary:
  608. //     This enum defines a set of calendar theme items for which
  609. //     XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT notification is sent.
  610. // See Also: XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT
  611. //===========================================================================
  612. enum XTPCalendarBeforeDrawThemeObject
  613. {
  614. xtpCalendarBeforeDraw_DayViewTimeScale          = 0x00000001, // dwParam2 - [in] nTimeScale = {1 - main, 2 - additional}
  615. xtpCalendarBeforeDraw_DayViewTimeScaleCaption   = 0x00000002, // dwParam2 - [in] nTimeScale = {1 - main, 2 - additional};
  616. xtpCalendarBeforeDraw_DayViewTimeScaleCell      = 0x00000004, // dwParam2 - [in] XTP_CALENDAR_THEME_DAYVIEWTIMESCALECELL_PARAMS*
  617. xtpCalendarBeforeDraw_DayViewDay                = 0x00000010, // dwParam2 - [in] CXTPCalendarDayViewDay*
  618. xtpCalendarBeforeDraw_DayViewDayGroup           = 0x00000020, // dwParam2 - [in] CXTPCalendarDayViewGroup*
  619. xtpCalendarBeforeDraw_DayViewCell               = 0x00000040, // dwParam2 - [in] XTP_CALENDAR_THEME_DAYVIEWCELL_PARAMS *
  620. xtpCalendarBeforeDraw_DayViewEvent              = 0x00000080, // dwParam2 - [in] CXTPCalendarDayViewEvent*
  621. xtpCalendarBeforeDraw_MonthViewDay              = 0x00001000, // dwParam2 - [in] CXTPCalendarMonthViewDay*
  622. xtpCalendarBeforeDraw_MonthViewEvent            = 0x00002000, // dwParam2 - [in] CXTPCalendarMonthViewEvent*
  623. xtpCalendarBeforeDraw_MonthViewWeekDayHeader    = 0x00004000, // dwParam2 - [in] WeekDay = {1-Sun, 2-Mon, ...}, -1 for common part;
  624. xtpCalendarBeforeDraw_MonthViewWeekHeader       = 0x00008000, // dwParam2 - [in] WeekIndex={0...N}, -1 for common part;
  625. xtpCalendarBeforeDraw_WeekViewDay               = 0x00100000, // dwParam2 - [in] CXTPCalendarWeekViewDay*
  626. xtpCalendarBeforeDraw_WeekViewEvent             = 0x00200000  // dwParam2 - [in] CXTPCalendarWeekViewEvent*
  627. };
  628. //---------------------------------------------------------------------------
  629. // Summary: This notification is sent for calendar theme items before draw.
  630. //          You may customize corresponding theme part for each object in this
  631. //          message. Any object part changes which made in this notification
  632. //          handler will be discarded when object draw finished.
  633. //          This let you dynamically customize each calendar item.
  634. //
  635. //          <b>Sender</b> - CXTPCalendarControl
  636. // Remarks:
  637. //          This notification send only for theme objects defined in BeforeDrawFlags.
  638. //          See Also: CXTPCalendarTheme::GetBeforeDrawFlags,
  639. //                    CXTPCalendarTheme::SetBeforeDrawFlags
  640. //          <b>Parameters</b>
  641. //              wParam - [in] An object ID from XTPCalendarBeforeDrawThemeObject enum.
  642. //              lParam - [in] An additional parameter defined for each item in
  643. //                            XTPCalendarBeforeDrawThemeObject.
  644. //
  645. //---------------------------------------------------------------------------
  646. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_BEFORE_DRAW_THEMEOBJECT = (WM_XTP_CALENDAR_BASE + 38);
  647. //===========================================================================
  648. // Summary:
  649. //     Set of parameters transferred from calendar items for
  650. //     XTP_NC_CALENDAR_GETITEMTEXT notification.
  651. // Remarks:
  652. //     This structure defines an calendar item, item data and in-out item text
  653. //     to customize.
  654. // See Also:
  655. //     XTP_NC_CALENDAR_GETITEMTEXTL,
  656. //     XTPCalendarGetItemText, XTPCalendarGetItemTextEx.
  657. //===========================================================================
  658. struct XTP_CALENDAR_GETITEMTEXT_PARAMS
  659. {
  660. int nItem;          // [in] One of the values from enums XTPCalendarGetItemText, XTPCalendarGetItemTextEx;
  661. CString* pstrText;  // [in, out] - Pointer to item text;
  662. CXTPCalendarViewEvent* pViewEvent;  // [in] Pointer to a ViewEvent object or NULL.
  663. CXTPCalendarViewDay* pViewDay;      // [in] Pointer to a ViewDay object or NULL.
  664. int nWeekDay;                       // [in] Zero or Week day number as: 1 - Sunday, 2 - Monday, ... 7 - Satyrday.
  665. };
  666. //-----------------------------------------------------------------------
  667. // Summary:
  668. //     This enum defines set of flags which enable calendar items
  669. //     to send XTP_NC_CALENDAR_GETITEMTEXT notification.
  670. // See Also:
  671. //     XTPCalendarGetItemTextEx, XTP_NC_CALENDAR_GETITEMTEXT,
  672. //     CXTPCalendarControl::GetAskItemTextFlags,
  673. //     CXTPCalendarControlPaintManager::GetAskItemTextFlags,
  674. //     CXTPCalendarControlPaintManager::SetAskItemTextFlags,
  675. //     CXTPCalendarTheme::GetAskItemTextFlags,
  676. //     CXTPCalendarTheme::SetAskItemTextFlags
  677. //-----------------------------------------------------------------------
  678. enum XTPCalendarGetItemText
  679. {
  680. xtpCalendarItemText_EventSubject            = 0x00000001, // Send request to customize Event subject text before draw it.
  681. xtpCalendarItemText_EventLocation           = 0x00000002, // Send request to customize Event location text before draw it.
  682. xtpCalendarItemText_DayViewDayHeader        = 0x00000004, // Send request to customize Day view day header text. Used for office 2003 theme only.
  683. xtpCalendarItemText_WeekViewDayHeader       = 0x00000008, // Send request to customize Week view day header text. Used for office 2003 theme only.
  684. xtpCalendarItemText_MonthViewDayHeader      = 0x00000010, // Send request to customize Month view day header text. Used for office 2003 theme only.
  685. xtpCalendarItemText_MonthViewWeekDayHeader  = 0x00000020, // Send request to customize month view week day header text.
  686. xtpCalendarItemText_EventToolTipText        = 0x00000040, // Send request to customize event tooltip text.
  687. //xtpCalendarItemText_GroupToolTipText      = 0x00000080,
  688. xtpCalendarItemText_EventStartTimeText      = 0x00000100, // Send request to customize event start time text.
  689. xtpCalendarItemText_EventEndTimeText        = 0x00000200  // Send request to customize event end time text.
  690. };
  691. //-----------------------------------------------------------------------
  692. // Summary:
  693. //     This enum defines set of flags which enable calendar items
  694. //     to send XTP_NC_CALENDAR_GETITEMTEXT notification.
  695. //     These flags are used for office 2007 theme only.
  696. // See Also:
  697. //     XTPCalendarGetItemText, XTP_NC_CALENDAR_GETITEMTEXT,
  698. //     CXTPCalendarControl::GetAskItemTextFlags,
  699. //     CXTPCalendarControlPaintManager::GetAskItemTextFlags,
  700. //     CXTPCalendarControlPaintManager::SetAskItemTextFlags,
  701. //     CXTPCalendarTheme::GetAskItemTextFlags,
  702. //     CXTPCalendarTheme::SetAskItemTextFlags
  703. //-----------------------------------------------------------------------
  704. enum XTPCalendarGetItemTextEx
  705. {
  706. xtpCalendarItemText_EventBody               = 0x00010000, // Send request to customize Event body text before draw it.
  707. xtpCalendarItemText_EventMarkupTemplate     = 0x04000000, // Send request to set Event Markup Template text before draw it.
  708. xtpCalendarItemText_DayViewDayHeaderLeft    = 0x00020000, // Send request to customize Day view day header text on the left.
  709. xtpCalendarItemText_DayViewDayHeaderCenter  = 0x00040000, // Send request to customize Day view day header text on the center.
  710. xtpCalendarItemText_DayViewDayHeaderRight   = 0x00080000, // Send request to customize Day view day header text on the right.
  711. xtpCalendarItemText_WeekViewDayHeaderLeft   = 0x00100000, // Send request to customize Week view day header text on the left.
  712. xtpCalendarItemText_WeekViewDayHeaderCenter = 0x00200000, // Send request to customize Week view day header text on the center.
  713. xtpCalendarItemText_WeekViewDayHeaderRight  = 0x00400000, // Send request to customize Week view day header text on the right.
  714. xtpCalendarItemText_MonthViewDayHeaderLeft  = 0x00800000, // Send request to customize Month view day header text on the left.
  715. xtpCalendarItemText_MonthViewDayHeaderCenter= 0x01000000, // Send request to customize Month view day header text on the center.
  716. xtpCalendarItemText_MonthViewDayHeaderRight = 0x02000000  // Send request to customize Month view day header text on the right.
  717. //  xtpCalendarItemText_MonthViewWeekHeader     = 0x08000000,
  718. };
  719. //-----------------------------------------------------------------------
  720. // Summary:
  721. //     This notification is sent for calendar items which defines
  722. //     in AskItemTextFlags property.
  723. // Remarks:
  724. //          <b>Parameters</b>
  725. //              wParam - [in/out] XTP_CALENDAR_GETITEMTEXT_PARAMS*.
  726. //              lParam - 0.
  727. // See Also:
  728. //     XTPCalendarGetItemTextEx, XTP_CALENDAR_GETITEMTEXT_PARAMS,
  729. //     CXTPCalendarControl::GetAskItemTextFlags,
  730. //     CXTPCalendarControlPaintManager::GetAskItemTextFlags,
  731. //     CXTPCalendarControlPaintManager::SetAskItemTextFlags,
  732. //     CXTPCalendarTheme::GetAskItemTextFlags,
  733. //     CXTPCalendarTheme::SetAskItemTextFlags
  734. //-----------------------------------------------------------------------
  735. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_GETITEMTEXT = (WM_XTP_CALENDAR_BASE + 39);
  736. //-----------------------------------------------------------------------
  737. // Summary:
  738. //     This enum defines set of user actions which can be customized.
  739. // See Also: XTP_NC_CALENDAR_USERACTION, XTP_CALENDAR_USERACTION_PARAMS
  740. //-----------------------------------------------------------------------
  741. enum XTPCalendarUserAction
  742. {
  743. xtpCalendarUserAction_OnExpandDay = 0x80000000, // Expand Day button was clicked for month or week view.
  744. xtpCalendarUserAction_OnScrollDay = 0x40000000, // Expand Day button was clicked for day view. (presents in office 2007 theme only)
  745. };
  746. //-----------------------------------------------------------------------
  747. // Summary:
  748. //     This enum defines parameters for xtpCalendarUserAction_OnExpandDay
  749. //     user action.
  750. // See Also: XTP_NC_CALENDAR_USERACTION, XTP_CALENDAR_USERACTION_PARAMS
  751. //-----------------------------------------------------------------------
  752. enum XTPCalendarExpandDayButton
  753. {
  754. xtpCalendarExpandDayButton_MonthView    = 0x01, // Defines Month view expand button.
  755. xtpCalendarExpandDayButton_WeekView     = 0x02, // Defines Week view expand button.
  756. };
  757. //-----------------------------------------------------------------------
  758. // Summary:
  759. //     This enum defines parameters for xtpCalendarUserAction_OnScrollDay
  760. //     user action. (valid for office 2007 theme only)
  761. // See Also: XTP_NC_CALENDAR_USERACTION, XTP_CALENDAR_USERACTION_PARAMS
  762. //-----------------------------------------------------------------------
  763. enum XTPCalendarScrollDayButton
  764. {
  765. xtpCalendarScrollDayButton_DayViewUp    = xtpCalendarHitTestDayViewScrollUp,   // Defines Day view Scroll Up button.
  766. xtpCalendarScrollDayButton_DayViewDown  = xtpCalendarHitTestDayViewScrollDown, // Defines Day view Scroll Down button.
  767. //xtpCalendarScrollDayButton_DayViewAllDayUp     = 5,
  768. //xtpCalendarScrollDayButton_DayViewAllDayDown = 6,
  769. };
  770. //===========================================================================
  771. // Summary:
  772. //     Set of parameters transferred from calendar items for
  773. //     XTP_NC_CALENDAR_USERACTION notification.
  774. // See Also:
  775. //     XTPCalendarUserAction
  776. //===========================================================================
  777. struct XTP_CALENDAR_USERACTION_PARAMS
  778. {
  779. //=======================================================================
  780. // Summary:
  781. //     Defines parameters for xtpCalendarUserAction_OnExpandDay user action.
  782. //=======================================================================
  783. struct EXPANDDAYBUTTONACTION_PARAMS
  784. {
  785. XTPCalendarExpandDayButton nButton;     // [in] from XTPCalendarExpandDayButton
  786. CXTPCalendarViewDay*       pViewDay;    // [in] Pointer to a ViewDay object or NULL.
  787. };
  788. //=======================================================================
  789. // Summary:
  790. //     Defines parameters for xtpCalendarUserAction_OnScrollDay user action.
  791. //=======================================================================
  792. struct SCROLLDAYBUTTONACTION_PARAMS
  793. {
  794. XTPCalendarScrollDayButton  nButton;    // [in] from XTPCalendarExpandDayButton
  795. CXTPCalendarDayViewGroup*   pViewGroup; // [in] Pointer to a ViewDay object or NULL.
  796. };
  797. //=======================================================================
  798. XTPCalendarUserAction m_eAction; // [in] A value from XTPCalendarUserAction
  799. // reserved for other actions in the feature
  800. union
  801. {
  802. EXPANDDAYBUTTONACTION_PARAMS m_ExpandDayButton; // Parameters for xtpCalendarUserAction_OnExpandDay user action.
  803. SCROLLDAYBUTTONACTION_PARAMS m_ScrollDayButton; // Parameters for xtpCalendarUserAction_OnScrollDay user action.
  804. };
  805. };
  806. //-----------------------------------------------------------------------
  807. // Summary:
  808. //    This notification send for when user action defined in XTPCalendarUserAction enum happened.
  809. //          <b>Parameters</b>
  810. //              wParam - [in] A pointer to XTP_CALENDAR_USERACTION_PARAMS structure.
  811. //              lParam - [out] A pointer to the return result: BOOL*.
  812. //                       Set TRUE if specified action is handled (to Cancel default processing) ,
  813. //                       otherwise FALSE.
  814. //                       Initial value is FALSE.
  815. // See Also:
  816. //    XTP_CALENDAR_USERACTION_PARAMS, XTPCalendarUserAction
  817. //-----------------------------------------------------------------------
  818. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_USERACTION = (WM_XTP_CALENDAR_BASE + 40);
  819. //---------------------------------------------------------------------------
  820. // Summary: This notification is sent when calendar is populating.
  821. //          lParam contains events which will be drawn for the group specified
  822. //          by wParam.
  823. //          You may add, remove or modify some events in CXTPCalendarEvents
  824. //          collection.
  825. //
  826. //          <b>Sender</b> - CXTPCalendarControl
  827. // Remarks:
  828. //          <b>Parameters</b>
  829. //              wParam - [in] CXTPCalendarViewDay* - A pointer to View Day.
  830. //              lParam - unused.
  831. // See Also: CXTPCalendarControl::Populate, XTP_NC_CALENDAR_PREPOPULATE
  832. //---------------------------------------------------------------------------
  833. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_PREPOPULATE_DAY = (WM_XTP_CALENDAR_BASE + 41);
  834. //---------------------------------------------------------------------------
  835. // Summary: This notification is sent when calendar paint theme changed.
  836. //          <b>Sender</b> - CXTPCalendarControl
  837. // Remarks:
  838. //          <b>Parameters</b>
  839. //              wParam - unused.
  840. //              lParam - unused.
  841. // See Also: CXTPCalendarControl::Populate, XTP_NC_CALENDAR_PREPOPULATE
  842. //---------------------------------------------------------------------------
  843. static const XTP_NOTIFY_CODE   XTP_NC_CALENDAR_THEME_CHANGED = (WM_XTP_CALENDAR_BASE + 42);
  844. // Next Free ID: (WM_XTP_CALENDAR_BASE + 43)
  845. /////////////////////////////////////////////////////////////////////////////
  846. #endif // !defined(_XTPCalendarNotifications_H__)