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

对话框与窗口

开发平台:

Visual C++

  1. // XTPReportDefines.h
  2. //
  3. // This file is a part of the XTREME REPORTCONTROL MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. //{{AFX_CODEJOCK_PRIVATE
  21. #if !defined(__XTPREPORTDEFINES_H__)
  22. #define __XTPREPORTDEFINES_H__
  23. //}}AFX_CODEJOCK_PRIVATE
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. #include "Common/XTPCustomHeap.h"
  28. //=============================================================================
  29. XTP_DECLARE_HEAP_ALLOCATOR_(CXTPReportDataAllocator, _XTP_EXT_CLASS)
  30. XTP_DECLARE_HEAP_ALLOCATOR_(CXTPReportRowAllocator, _XTP_EXT_CLASS)
  31. // to allocate in the app default heap
  32. XTP_DECLARE_HEAP_ALLOCATOR_(CXTPReportAllocatorDefault, _XTP_EXT_CLASS)
  33. //=============================================================================
  34. XTP_DECLARE_BATCH_ALLOC_OBJ_DATA_(CXTPReportRow_BatchData, _XTP_EXT_CLASS);
  35. XTP_DECLARE_BATCH_ALLOC_OBJ_DATA_(CXTPReportGroupRow_BatchData, _XTP_EXT_CLASS);
  36. //-----------------------------------------------------------------------
  37. // Summary:
  38. //     NULL terminated string used by CXTPReportControl which specifies
  39. //     the window class name for the report control.
  40. // Example:
  41. // <code>
  42. // BOOL CXTPReportControl::RegisterWindowClass()
  43. // {
  44. //     WNDCLASS wndcls;
  45. //     HINSTANCE hInst = AfxGetInstanceHandle();
  46. //
  47. //     if (!(::GetClassInfo(hInst, XTPREPORTCTRL_CLASSNAME, &wndcls)))
  48. //     {
  49. //         // otherwise we need to register a new class
  50. //         wndcls.style            = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
  51. //         wndcls.lpfnWndProc      = ::DefWindowProc;
  52. //         wndcls.cbClsExtra       = wndcls.cbWndExtra = 0;
  53. //         wndcls.hInstance        = hInst;
  54. //         wndcls.hIcon            = NULL;
  55. //         wndcls.hCursor          = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
  56. //         wndcls.hbrBackground    = (HBRUSH) (COLOR_3DFACE + 1);
  57. //         wndcls.lpszMenuName     = NULL;
  58. //         wndcls.lpszClassName    = XTPREPORTCTRL_CLASSNAME;
  59. //
  60. //         if (!AfxRegisterClass(&wndcls))
  61. //         {
  62. //             AfxThrowResourceException();
  63. //             return FALSE;
  64. //         }
  65. //     }
  66. //
  67. //     return TRUE;
  68. // }
  69. // </code>
  70. // See Also:
  71. //     CXTPReportControl::RegisterWindowClass
  72. //-----------------------------------------------------------------------
  73. const TCHAR XTPREPORTCTRL_CLASSNAME[] = _T("XTPReport");
  74. //===========================================================================
  75. // Summary:
  76. //     Report control records clipboard format name.
  77. //===========================================================================
  78. static const LPCTSTR XTPREPORTCTRL_CF_RECORDS = _T("XTPReport_CF_Records");
  79. //-----------------------------------------------------------------------
  80. // Summary:
  81. //     This constant indicates that a COLORREF is not defined.
  82. // Example:
  83. // <code>
  84. // void CXTPReportRecordItem::GetItemMetrics(
  85. //     XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs,
  86. //     XTP_REPORTRECORDITEM_METRICS* pItemMetrics)
  87. // {
  88. //     if (m_clrBackground != XTP_REPORT_COLOR_DEFAULT)
  89. //         pItemMetrics->clrBackground = m_clrBackground;
  90. //
  91. //     if (m_clrText != XTP_REPORT_COLOR_DEFAULT)
  92. //         pItemMetrics->clrForeground = m_clrText;
  93. //
  94. //     if (m_pFontCaption != NULL)
  95. //         pItemMetrics->pFont = m_pFontCaption;
  96. //
  97. //     else if (m_bBoldText)
  98. //         pItemMetrics->pFont =
  99. //             &pDrawArgs->pControl->GetPaintManager()->m_fontBoldText;
  100. // }
  101. // </code>
  102. // See Also:
  103. //    CXTPReportRecordItem, CXTPReportRow
  104. //-----------------------------------------------------------------------
  105. const COLORREF XTP_REPORT_COLOR_DEFAULT = (COLORREF)-1;
  106. //-----------------------------------------------------------------------
  107. // Summary:
  108. //     This constant indicates that an icon ID is not defined.
  109. // Example:
  110. // <code>
  111. // m_wndReport.AddColumn(new CXTPReportColumn(COLUMN_PRICE, _T("Price"),
  112. //     80, TRUE, XTP_REPORT_NOICON, TRUE, FALSE));
  113. // </code>
  114. // See Also:
  115. //    CXTPReportColumn
  116. //-----------------------------------------------------------------------
  117. const int XTP_REPORT_NOICON = (int)-1;
  118. //-----------------------------------------------------------------------
  119. // Summary:
  120. //     Defines message for header context menu
  121. // Parameters:
  122. //     id -         Resource ID for the control.
  123. //     memberFxn -  Name of member function to handle the message.
  124. // Remarks:
  125. //     The XTP_NM_REPORT_HEADER_RCLICK notification message is sent to inform
  126. //     the owner window that the user has right clicked column of report control
  127. //     The owner window of the report control receives this notification
  128. //     threw the WM_COMMAND message.
  129. // Example:
  130. //     Here is an example of how an application would handle this message.
  131. // <code>
  132. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  133. //     ON_NOTIFY(XTP_NM_REPORT_HEADER_RCLICK, XTP_ID_REPORT_CONTROL, OnReportColumnRClick)
  134. // END_MESSAGE_MAP()
  135. //
  136. // void CReportSampleView::OnReportColumnRClick(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  137. // {
  138. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*)pNotifyStruct;
  139. //     ASSERT(pItemNotify->pColumn);
  140. //     CPoint ptClick = pItemNotify->pt;
  141. //
  142. //     // TODO: Handle command.
  143. // }
  144. // </code>
  145. // See Also:
  146. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED,
  147. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  148. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  149. //     CXTPReportControl, CXTPReportHeader
  150. //-----------------------------------------------------------------------
  151. #define XTP_NM_REPORT_HEADER_RCLICK         (NM_FIRST-51)
  152. //-----------------------------------------------------------------------
  153. // Summary:
  154. //     Defines message for handling rows selection changed event.
  155. // Parameters:
  156. //     id -         Resource ID for the control.
  157. //     memberFxn -  Name of member function to handle the message.
  158. // Remarks:
  159. //     The XTP_NM_REPORT_SELCHANGED notification message is sent to inform
  160. //     the owner window that the user select row of report control
  161. //     The owner window of the report control receives this notification
  162. //     threw the WM_COMMAND message.
  163. // Example:
  164. //     Here is an example of how an application would handle this message.
  165. // <code>
  166. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  167. //     ON_NOTIFY(XTP_NM_REPORT_SELCHANGED, XTP_ID_REPORT_CONTROL, OnReportSelChanged)
  168. // END_MESSAGE_MAP()
  169. //
  170. // void CReportSampleView::OnReportSelChanged(NMHDR* pNMHDR, LRESULT* /*result*/)
  171. // {
  172. //     // TODO: Handle command.
  173. // }
  174. // </code>
  175. // See Also:
  176. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  177. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN,
  178. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  179. //     CXTPReportControl, CXTPReportHeader
  180. //-----------------------------------------------------------------------
  181. #define XTP_NM_REPORT_SELCHANGED            (NM_FIRST-52)
  182. //-----------------------------------------------------------------------
  183. // Summary:
  184. //     Defines message for handling row checking event.
  185. // Parameters:
  186. //     id -         Resource ID for the control.
  187. //     memberFxn -  Name of member function to handle the message.
  188. // Remarks:
  189. //     The XTP_NM_REPORT_CHECKED notification message is sent to inform
  190. //     the owner window that the user click check box  of item of report control
  191. //     The owner window of the report control receives this notification
  192. //     threw the WM_COMMAND message.
  193. // Example:
  194. //     Here is an example of how an application would handle this message.
  195. // <code>
  196. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  197. //     ON_NOTIFY(XTP_NM_REPORT_CHECKED, XTP_ID_REPORT_CONTROL, OnReportCheckItem)
  198. // END_MESSAGE_MAP()
  199. //
  200. // void CReportSampleView::OnReportCheckItem(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  201. // {
  202. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  203. //     ASSERT(pItemNotify != NULL);
  204. //
  205. //     // TODO: Handle command.
  206. // }
  207. // </code>
  208. // See Also:
  209. //     XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  210. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  211. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  212. //     CXTPReportControl, CXTPReportHeader
  213. //-----------------------------------------------------------------------
  214. #define XTP_NM_REPORT_CHECKED               (NM_FIRST-53)
  215. //-----------------------------------------------------------------------
  216. // Summary:
  217. //     Defines message for handling hyperlink click event.
  218. // Parameters:
  219. //     id -         Resource ID for the control.
  220. //     memberFxn -  Name of member function to handle the message.
  221. // Remarks:
  222. //     The XTP_NM_REPORT_HYPERLINK notification message is sent to inform
  223. //     the owner window that the user click hyperlink of item.
  224. //     The owner window of the report control receives this notification
  225. //     threw the WM_COMMAND message.
  226. // Example:
  227. //     Here is an example of how an application would handle this message.
  228. // <code>
  229. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  230. //     ON_NOTIFY(XTP_NM_REPORT_HYPERLINK, XTP_ID_REPORT_CONTROL, OnReportHyperlinkClick)
  231. // END_MESSAGE_MAP()
  232. //
  233. // void CReportSampleView::OnReportHyperlinkClick(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  234. // {
  235. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  236. //
  237. //     if (!pItemNotify->pRow || !pItemNotify->pColumn)
  238. //         return;
  239. //
  240. //     // if click on Hyperlink in Item
  241. //     if (pItemNotify->nHyperlink >= 0)
  242. //     {
  243. //         TRACE(_T("Hyperlink Click : n row %d n col %d n Hyperlink %d.n"),
  244. //             pItemNotify->pRow->GetIndex(),
  245. //             pItemNotify->pColumn->GetItemIndex(),
  246. //             pItemNotify->nHyperlink);
  247. //     }
  248. // }
  249. // </code>
  250. // See Also:
  251. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  252. //     XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  253. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  254. //     CXTPReportControl, CXTPReportHeader
  255. //-----------------------------------------------------------------------
  256. #define XTP_NM_REPORT_HYPERLINK             (NM_FIRST-54)
  257. //-----------------------------------------------------------------------
  258. // Summary:
  259. //     Defines message for column changed event.
  260. // Parameters:
  261. //     id -         Resource ID for the control.
  262. //     memberFxn -  Name of member function to handle the message.
  263. // Remarks:
  264. //     The XTP_NM_REPORT_COLUMNORDERCHANGED notification message is sent to inform
  265. //     the owner window that the user change the order of columns of report control.
  266. //     The owner window of the report control receives this notification
  267. //     threw the WM_COMMAND message.
  268. // Example:
  269. //     Here is an example of how an application would handle this message.
  270. // <code>
  271. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  272. //     ON_NOTIFY(XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_ID_REPORT_CONTROL, OnReportColumnOrderChanged)
  273. // END_MESSAGE_MAP()
  274. //
  275. // void CReportSampleView::OnReportColumnOrderChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  276. // {
  277. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  278. //     ASSERT(pItemNotify != NULL);
  279. //
  280. //     // TODO: Handle command.
  281. // }
  282. // </code>
  283. // See Also:
  284. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_HEADER_RCLICK,
  285. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  286. //     XTP_NM_REPORT_GROUPORDERCHANGED, XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  287. //     CXTPReportControl, CXTPReportHeader
  288. //-----------------------------------------------------------------------
  289. #define XTP_NM_REPORT_COLUMNORDERCHANGED    (NM_FIRST-55)
  290. //-----------------------------------------------------------------------
  291. // Summary:
  292. //     Defines message for sort changed event.
  293. // Parameters:
  294. //     id -         Resource ID for the control.
  295. //     memberFxn -  Name of member function to handle the message.
  296. // Remarks:
  297. //     The XTP_NM_REPORT_SORTORDERCHANGED notification message is sent to inform
  298. //     the owner window that the user change click header of report control and change sort order.
  299. //     The owner window of the report control receives this notification
  300. //     threw the WM_COMMAND message.
  301. // Example:
  302. //     Here is an example of how an application would handle this message.
  303. // <code>
  304. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  305. //     ON_NOTIFY(XTP_NM_REPORT_SORTORDERCHANGED, XTP_ID_REPORT_CONTROL, OnReportSortOrderChanged)
  306. // END_MESSAGE_MAP()
  307. //
  308. // void CReportSampleView::OnReportSortOrderChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  309. // {
  310. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  311. //     ASSERT(pItemNotify != NULL);
  312. //
  313. //     // TODO: Handle command.
  314. // }
  315. // </code>
  316. // See Also:
  317. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  318. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  319. //     XTP_NM_REPORT_VALUECHANGED,
  320. //     CXTPReportControl, CXTPReportHeader
  321. //-----------------------------------------------------------------------
  322. #define XTP_NM_REPORT_SORTORDERCHANGED      (NM_FIRST-56)
  323. //-----------------------------------------------------------------------
  324. // Summary:
  325. //     Defines message when a column header has been clicked and the sort order
  326. //      has changed, but CXTPReportControl::Populate has NOT yet been called.
  327. // Parameters:
  328. //     id -         Resource ID for the control.
  329. //     memberFxn -  Name of member function to handle the message.
  330. // Remarks:
  331. //     The XTP_NM_REPORT_PRESORTORDERCHANGED notification message is sent to inform
  332. //     the owner window that the user change click header of report control the sort order will
  333. //     change. XTP_NM_REPORT_PRESORTORDERCHANGED is send BEFORE CXTPReportControl::Populate has been
  334. //     called, so the order of the rows has not yet been visibly changed.  After CXTPReportControl::Populate is called,
  335. //     the XTP_NM_REPORT_SORTORDERCHANGED notification is send to inform that the order has actually
  336. //     changed.
  337. //     The owner window of the report control receives this notification
  338. //     threw the WM_COMMAND message.
  339. // See Also:
  340. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  341. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  342. //     XTP_NM_REPORT_VALUECHANGED, XTP_NM_REPORT_SORTORDERCHANGED
  343. //     CXTPReportControl, CXTPReportHeader
  344. //-----------------------------------------------------------------------
  345. #define XTP_NM_REPORT_PRESORTORDERCHANGED   (NM_FIRST-67)
  346. //-----------------------------------------------------------------------
  347. // Summary:
  348. //     Defines message for value changed event.
  349. // Parameters:
  350. //     id -         Resource ID for the control.
  351. //     memberFxn -  Name of member function to handle the message.
  352. // Remarks:
  353. //     The XTP_NM_REPORT_VALUECHANGED notification message is sent to inform
  354. //     the owner window that the user change value of report cell
  355. //     The owner window of the report control receives this notification
  356. //     threw the WM_COMMAND message.
  357. // <code>
  358. // BEGIN_MESSAGE_MAP(CPropertiesView, CXTPReportView)
  359. //     ON_NOTIFY(XTP_NM_REPORT_VALUECHANGED, ID_REPORT_CONTROL, OnReportValueChanged)
  360. // END_MESSAGE_MAP()
  361. //
  362. // void CPropertiesView::OnReportValueChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  363. // {
  364. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  365. //     ASSERT(pItemNotify != NULL);
  366. //
  367. //     switch (pItemNotify->pItem->GetItemData())
  368. //     {
  369. //         case ID_PROPERTY_MULTIPLESELECTION:
  370. //             GetTargetReport()->SetMultipleSelection(
  371. //                 CRecordPropertyBool::GetValue(pItemNotify));
  372. //             break;
  373. //         case ID_PROPERTY_PREVIEWMODE:
  374. //             GetTargetReport()->EnablePreviewMode(
  375. //                 CRecordPropertyBool::GetValue(pItemNotify));
  376. //             GetTargetReport()->Populate();
  377. //             break;
  378. //         case ID_PROPERTY_GROUPBOXVISIBLE:
  379. //             GetTargetReport()->ShowGroupBy(
  380. //                 CRecordPropertyBool::GetValue(pItemNotify));
  381. //             break;
  382. //         case ID_PROPERTY_FOCUSSUBITEMS:
  383. //             GetTargetReport()->FocusSubItems(
  384. //                 CRecordPropertyBool::GetValue(pItemNotify));
  385. //             break;
  386. //         case ID_PROPERTY_ALLOWCOLUMNREMOVE:
  387. //             GetTargetReport()->GetReportHeader()->AllowColumnRemove(
  388. //                 CRecordPropertyBool::GetValue(pItemNotify));
  389. //             break;
  390. //         case ID_PROPERTY_ALLOWCOLUMNREORDER:
  391. //             GetTargetReport()->GetReportHeader()->AllowColumnReorder(
  392. //                 CRecordPropertyBool::GetValue(pItemNotify));
  393. //             break;
  394. //         case ID_PROPERTY_ALLOWCOLUMNRESIZE:
  395. //             GetTargetReport()->GetReportHeader()->AllowColumnResize(
  396. //                 CRecordPropertyBool::GetValue(pItemNotify));
  397. //             break;
  398. //         case ID_PROPERTY_FLATHEADER:
  399. //             GetTargetReport()->GetPaintManager()->m_columnStyle =
  400. //                 (CRecordPropertyBool::GetValue(pItemNotify)) ? xtpReportColumnFlat : xtpReportColumnShaded;
  401. //             break;
  402. //         case ID_PROPERTY_HIDESELECTION:
  403. //             GetTargetReport()->GetPaintManager()->m_bHideSelection =
  404. //                 (CRecordPropertyBool::GetValue(pItemNotify));
  405. //             break;
  406. //         case ID_PROPERTY_TREEINDENT:
  407. //             GetTargetReport()->GetPaintManager()->m_nTreeIndent =
  408. //                 CRecordPropertyInt::GetValue(pItemNotify);
  409. //             GetTargetReport()->RedrawControl();
  410. //             break;
  411. //     }
  412. // }
  413. // </code>
  414. // See Also:
  415. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  416. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  417. //     XTP_NM_REPORT_SORTORDERCHANGED,
  418. //     CXTPReportControl, CXTPReportHeader
  419. //-----------------------------------------------------------------------
  420. #define XTP_NM_REPORT_VALUECHANGED          (NM_FIRST-57)
  421. //-----------------------------------------------------------------------
  422. // Summary:
  423. //     Defines message for in-place button click event.
  424. // Parameters:
  425. //     id -         Resource ID for the control.
  426. //     memberFxn -  Name of member function to handle the message.
  427. // Remarks:
  428. //     The XTP_NM_REPORT_INPLACEBUTTONDOWN notification message is sent to inform
  429. //     the owner window that the user click in-place button of report control
  430. //     The owner window of the report control receives this notification
  431. //     threw the WM_COMMAND message.
  432. // Returns:
  433. //     TRUE if message was processed; FALSE for default process.
  434. // Example:
  435. //     Here is an example of how an application would handle this message.
  436. // <code>
  437. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  438. //     ON_NOTIFY(XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_ID_REPORT_CONTROL, OnReportButtonClick)
  439. // END_MESSAGE_MAP()
  440. //
  441. // void CReportSampleView::OnReportButtonClick(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  442. // {
  443. //     XTP_NM_REPORTINPLACEBUTTON* pItemNotify = (XTP_NM_REPORTINPLACEBUTTON*) pNotifyStruct;
  444. //     ASSERT(pItemNotify->pButton);
  445. //
  446. //     // TODO: Handle command.
  447. // }
  448. // </code>
  449. // See Also:
  450. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  451. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_SELCHANGED,
  452. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  453. //     CXTPReportControl, CXTPReportHeader
  454. //-----------------------------------------------------------------------
  455. #define XTP_NM_REPORT_INPLACEBUTTONDOWN     (NM_FIRST-58)
  456. //-----------------------------------------------------------------------
  457. // Summary:
  458. //     Defines message for row expand event.
  459. // Parameters:
  460. //     id -         Resource ID for the control.
  461. //     memberFxn -  Name of member function to handle the message.
  462. // Remarks:
  463. //     The XTP_NM_REPORT_ROWEXPANDED notification message is sent to inform
  464. //     the owner window that the user expand or collapse the row of report control .
  465. // Example:
  466. //     Here is an example of how an application would handle this message.
  467. // <code>
  468. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  469. //     ON_NOTIFY(XTP_NM_REPORT_ROWEXPANDED, XTP_ID_REPORT_CONTROL, OnReportRowExpandChanged)
  470. // END_MESSAGE_MAP()
  471. //
  472. // void CReportSampleView::OnReportRowExpandChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  473. // {
  474. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  475. //     ASSERT(pItemNotify != NULL);
  476. //
  477. //     // TODO: Handle command.
  478. // }
  479. // </code>
  480. // See Also:
  481. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_HEADER_RCLICK,
  482. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  483. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  484. //     CXTPReportControl, CXTPReportHeader
  485. //-----------------------------------------------------------------------
  486. #define XTP_NM_REPORT_ROWEXPANDED           (NM_FIRST-59)
  487. //-----------------------------------------------------------------------
  488. // Summary:
  489. //     Defines message for left mouse button click.
  490. // Parameters:
  491. //     id -         Resource ID for the control.
  492. //     memberFxn -  Name of member function to handle the message.
  493. // Remarks:
  494. //     The XTP_NM_REPORT_LBUTTONDOWN notification message is sent to inform
  495. //     the owner window that the user press left button on the row.
  496. // Example:
  497. //     Here is an example of how an application would handle this message.
  498. // <code>
  499. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  500. //     ON_NOTIFY(XTP_NM_REPORT_LBUTTONDOWN, XTP_ID_REPORT_CONTROL, OnReportLButtonDown)
  501. // END_MESSAGE_MAP()
  502. //
  503. // void CReportSampleView::OnReportLButtonDown(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  504. // {
  505. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  506. //     ASSERT(pItemNotify != NULL);
  507. //
  508. //     // TODO: Handle command.
  509. // }
  510. // </code>
  511. // See Also:
  512. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_HEADER_RCLICK,
  513. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  514. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  515. //     CXTPReportControl, CXTPReportHeader
  516. //-----------------------------------------------------------------------
  517. #define XTP_NM_REPORT_LBUTTONDOWN           (NM_FIRST-60)
  518. //-----------------------------------------------------------------------
  519. // Summary:
  520. //     Defines message for handling CXTPReportControl::GetItemMetrics().
  521. // Parameters:
  522. //     id -         Resource ID for the control.
  523. //     memberFxn -  Name of member function to handle the message.
  524. // Remarks:
  525. //     The XTP_NM_REPORT_GETITEMMETRICS notification message is sent to allow
  526. //     the owner window customize item drawing.
  527. //     The owner window of the report control receives this notification
  528. //     threw the WM_COMMAND message.
  529. // Example:
  530. //     Here is an example of how an application would handle this message.
  531. // <code>
  532. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  533. //     ON_NOTIFY(XTP_NM_REPORT_GETITEMMETRICS, XTP_ID_REPORT_CONTROL, OnReportGetItemMetrics)
  534. // END_MESSAGE_MAP()
  535. //
  536. // void CReportSampleView::OnReportGetItemMetrics(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  537. // {
  538. //     XTP_NM_REPORTITEMMETRICS* pItemNotify = (XTP_NM_REPORTITEMMETRICS*)pNotifyStruct;
  539. //
  540. //     ASSERT(pItemNotify->pDrawArgs);
  541. //     ASSERT(pItemNotify->pDrawArgs->pControl);
  542. //     ASSERT(pItemNotify->pDrawArgs->pRow);
  543. //
  544. //     //     pItemNotify->pDrawArgs->pColumn   - may be NULL (for a group row)
  545. //     //     pItemNotify->pDrawArgs->pItem     - may be NULL (for a group row)
  546. //
  547. //     ASSERT(pItemNotify->pItemMetrics);
  548. //
  549. //     // TODO: customize members of pItemNotify->pItemMetrics.
  550. // }
  551. // </code>
  552. // See Also:
  553. //     CXTPReportControl, CXTPReportControl::GetItemMetrics()
  554. //-----------------------------------------------------------------------
  555. #define XTP_NM_REPORT_GETITEMMETRICS        (NM_FIRST-61)
  556. //-----------------------------------------------------------------------
  557. // Summary:
  558. //     Defines message for handling CXTPReportControl::OnRequestEdit().
  559. // Parameters:
  560. //     id -         Resource ID for the control.
  561. //     memberFxn -  Name of member function to handle the message.
  562. // Remarks:
  563. //     The XTP_NM_REPORT_REQUESTEDIT notification message is sent to notify
  564. //     that an item has entered edit mode.  This is send when an editable
  565. //     item starts to be edited or when a check box item is checkedunchecked.
  566. // See Also:
  567. //     CXTPReportControl, CXTPReportControl::OnRequestEdit()
  568. //-----------------------------------------------------------------------
  569. #define XTP_NM_REPORT_REQUESTEDIT           (NM_FIRST-62)
  570. //-----------------------------------------------------------------------
  571. // Summary:
  572. //     Defines message for handling CXTPReportControl::OnBeforeCopyToText().
  573. // Parameters:
  574. //     id -         Resource ID for the control.
  575. //     memberFxn -  Name of member function to handle the message.
  576. // Remarks:
  577. //     The XTP_NM_REPORT_BEFORE_COPY_TOTEXT notification message is sent to allow
  578. //     the owner window customize copy/paste operations.
  579. // Example:
  580. //     Here is an example of how an application would handle this message.
  581. // <code>
  582. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  583. //     ON_NOTIFY(XTP_NM_REPORT_BEFORE_COPY_TOTEXT, XTP_ID_REPORT_CONTROL, OnBeforeCopyToText)
  584. // END_MESSAGE_MAP()
  585. //
  586. // void CReportSampleView::OnBeforeCopyToText(NMHDR*  pNotifyStruct, LRESULT* result)
  587. // {
  588. //  ASSERT(pNotifyStruct);
  589. //
  590. //  XTP_NM_REPORT_BEFORE_COPYPASTE* pnmCopyPaste = (XTP_NM_REPORT_BEFORE_COPYPASTE*)pNotifyStruct;
  591. //
  592. //  if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !*pnmCopyPaste->ppRecord ||
  593. //      !pnmCopyPaste->parStrings)
  594. //  {
  595. //      ASSERT(FALSE);
  596. //      return;
  597. //  }
  598. //
  599. //  // customize data provided by pnmCopyPaste->parStrings
  600. //  // you can use source record object: (*pnmCopyPaste->ppRecord)->Member()
  601. //
  602. //  // set result to not zero to cancel operation:
  603. //  // *result = (LRESULT)TRUE;
  604. // }
  605. // </code>
  606. // See Also:
  607. //     CXTPReportControl, CXTPReportControl::OnBeforeCopyToText()
  608. //-----------------------------------------------------------------------
  609. #define XTP_NM_REPORT_BEFORE_COPY_TOTEXT    (NM_FIRST-63)
  610. //-----------------------------------------------------------------------
  611. // Summary:
  612. //     Defines message for handling CXTPReportControl::OnBeforePasteFromText().
  613. // Parameters:
  614. //     id -         Resource ID for the control.
  615. //     memberFxn -  Name of member function to handle the message.
  616. // Remarks:
  617. //     The XTP_NM_REPORT_BEFORE_PASTE_FROMTEXT notification message is sent
  618. //     to allow the owner window customize copy/paste operations.
  619. // Example:
  620. //     Here is an example of how an application would handle this message.
  621. // <code>
  622. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  623. //     ON_NOTIFY(XTP_NM_REPORT_BEFORE_PASTE_FROMTEXT, XTP_ID_REPORT_CONTROL, OnReportBeforePasteFromText)
  624. // END_MESSAGE_MAP()
  625. //
  626. //  void CReportSampleView::OnReportBeforePasteFromText(NMHDR*  pNotifyStruct, LRESULT* result)
  627. //  {
  628. //      ASSERT(pNotifyStruct);
  629. //
  630. //      XTP_NM_REPORT_BEFORE_COPYPASTE* pnmCopyPaste = (XTP_NM_REPORT_BEFORE_COPYPASTE*)pNotifyStruct;
  631. //
  632. //      if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !pnmCopyPaste->parStrings) {
  633. //          ASSERT(FALSE);
  634. //          return;
  635. //      }
  636. //
  637. //      CMessageRecord* pRecord = new CMessageRecord();
  638. //      if (!pRecord) {
  639. //          return;
  640. //      }
  641. //
  642. //      *pnmCopyPaste->ppRecord = pRecord;
  643. //
  644. //      CXTPReportColumns* pColumns = GetReportCtrl().GetColumns();
  645. //      ASSERT(pColumns);
  646. //      if (!pColumns) {
  647. //          return;
  648. //      }
  649. //
  650. //      int nDataCount = pnmCopyPaste->parStrings->GetSize();
  651. //
  652. //      const int nColumnCount = pColumns->GetVisibleColumnsCount();
  653. //      for (int nCol = 0; nCol < nColumnCount; nCol++)
  654. //      {
  655. //          CXTPReportColumn* pColumn = pColumns->GetVisibleAt(nCol);
  656. //          CXTPReportRecordItem* pItem = pRecord->GetItem(pColumn);
  657. //          ASSERT(pItem);
  658. //          if (NULL == pItem)
  659. //              continue;
  660. //
  661. //          if (nCol < nDataCount)
  662. //          {
  663. //              CString strItem = pnmCopyPaste->parStrings->GetAt(nCol);
  664. //              pItem->SetCaption(strItem);
  665. //          }
  666. //      }
  667. //      // set result to not zero to cancel operation:
  668. //      // *result = (LRESULT)TRUE;
  669. //  }
  670. // </code>
  671. // See Also:
  672. //     CXTPReportControl, CXTPReportControl::OnBeforePasteFromText()
  673. //-----------------------------------------------------------------------
  674. #define XTP_NM_REPORT_BEFORE_PASTE_FROMTEXT (NM_FIRST-64)
  675. //-----------------------------------------------------------------------
  676. // Summary:
  677. //     Defines message for handling CXTPReportControl::OnBeforePaste().
  678. // Parameters:
  679. //     id -         Resource ID for the control.
  680. //     memberFxn -  Name of member function to handle the message.
  681. // Remarks:
  682. //     The XTP_NM_REPORT_BEFORE_PASTE notification message is sent to allow
  683. //     the owner window customize copy/paste operations.
  684. // Example:
  685. //     Here is an example of how an application would handle this message.
  686. // <code>
  687. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  688. //     ON_NOTIFY(XTP_NM_REPORT_BEFORE_PASTE, XTP_ID_REPORT_CONTROL, OnBeforePaste)
  689. // END_MESSAGE_MAP()
  690. //
  691. // void CReportSampleView::OnBeforePaste(NMHDR*  pNotifyStruct, LRESULT* result)
  692. // {
  693. //  ASSERT(pNotifyStruct);
  694. //
  695. //  XTP_NM_REPORT_BEFORE_COPYPASTE* pnmCopyPaste = (XTP_NM_REPORT_BEFORE_COPYPASTE*)pNotifyStruct;
  696. //  ASSERT(pnmCopyPaste && pnmCopyPaste->parStrings == NULL);
  697. //
  698. //  if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !*pnmCopyPaste->ppRecord) {
  699. //      ASSERT(FALSE);
  700. //      return;
  701. //  }
  702. //
  703. //  // you can create new or change provided record using pnmCopyPaste->ppRecord
  704. //
  705. //  // set result to not zero to cancel operation:
  706. //  // *result = (LRESULT)TRUE;
  707. // }
  708. // </code>
  709. // See Also:
  710. //     CXTPReportControl, CXTPReportControl::OnBeforePaste()
  711. //-----------------------------------------------------------------------
  712. #define XTP_NM_REPORT_BEFORE_PASTE          (NM_FIRST-65)
  713. //{{AFX_CODEJOCK_PRIVATE
  714. // Internal Trace operation
  715. #define XTP_TRACE
  716. //}}AFX_CODEJOCK_PRIVATE
  717. //-----------------------------------------------------------------------
  718. // Summary:
  719. //     Defines message for handling CXTPReportHeader::AdjustColumnsWidth().
  720. // Parameters:
  721. //     id -         Resource ID for the control.
  722. //     memberFxn -  Name of member function to handle the message.
  723. // Remarks:
  724. //     The XTP_NM_REPORT_COLUMNWIDTHCHANGED notification message is sent
  725. //     when the width of a column has changed.  This can happen when the user
  726. //     changes the width or when the Report Control automatically changes the
  727. //     width.
  728. // See Also:
  729. //     CXTPReportHeader, CXTPReportHeader::AdjustColumnsWidth
  730. //-----------------------------------------------------------------------
  731. #define XTP_NM_REPORT_COLUMNWIDTHCHANGED    (NM_FIRST-68)
  732. //-----------------------------------------------------------------------
  733. // Summary:
  734. //     Defines message for handling CXTPReportControl::OnPreviewKeyDown().
  735. // Parameters:
  736. //     id -         Resource ID for the control.
  737. //     memberFxn -  Name of member function to handle the message.
  738. // Remarks:
  739. //     This notification is sent to Main window in a WM_NOTIFY message before
  740. //     processing OnKeyDown event.
  741. // See Also:
  742. //     CXTPReportControl::OnPreviewKeyDown, XTP_NM_REPORTPREVIEWKEYDOWN,
  743. //     CXTPReportControl::OnKeyDown, CWnd::OnKeyDown.
  744. //-----------------------------------------------------------------------
  745. #define XTP_NM_REPORT_PREVIEWKEYDOWN        (NM_FIRST-69)
  746. //-----------------------------------------------------------------------
  747. // Summary:
  748. //     Indicates the user start dragging records.
  749. // Parameters:
  750. //     id -         Resource ID for the control.
  751. //     memberFxn -  Name of member function to handle the message.
  752. // Remarks:
  753. //     XTP_NM_REPORTDRAGDROP structure passed with this message
  754. // See Also:
  755. //     XTP_NM_REPORTDRAGDROP, XTP_NM_REPORT_BEGINDRAG, XTP_NM_REPORT_DROP,
  756. //     XTP_NM_REPORT_RECORDS_DROPPED, XTP_NM_REPORT_DRAGDROP_COMPLETED
  757. //-----------------------------------------------------------------------
  758. #define XTP_NM_REPORT_BEGINDRAG             (NM_FIRST-70)
  759. //-----------------------------------------------------------------------
  760. // Summary:
  761. //     Indicates the user dropped records to report control.
  762. // Parameters:
  763. //     id -         Resource ID for the control.
  764. //     memberFxn -  Name of member function to handle the message.
  765. // Remarks:
  766. //     XTP_NM_REPORTDRAGDROP structure passed with this message
  767. // See Also:
  768. //     XTP_NM_REPORTDRAGDROP, XTP_NM_REPORT_BEGINDRAG,
  769. //     XTP_NM_REPORT_RECORDS_DROPPED, XTP_NM_REPORT_DRAGDROP_COMPLETED
  770. //-----------------------------------------------------------------------
  771. #define XTP_NM_REPORT_DROP                  (NM_FIRST-71)
  772. //-----------------------------------------------------------------------
  773. // Summary:
  774. //     Defines message for in-place editing is canceled and value is not
  775. //     changed event.
  776. // Parameters:
  777. //     id        -  Resource ID for the control.
  778. //     memberFxn -  Name of member function to handle the message.
  779. // Remarks:
  780. //     XTP_NM_REPORTRECORDITEM structure passed with this message
  781. // See Also:
  782. //     XTP_NM_REPORTRECORDITEM, XTP_NM_REPORT_VALUECHANGED,
  783. //     CXTPReportRecordItem::OnEditCanceled
  784. //-----------------------------------------------------------------------
  785. #define XTP_NM_REPORT_EDIT_CANCELED         (NM_FIRST-72)
  786. //-----------------------------------------------------------------------
  787. // Summary:
  788. //     Indicates the user changed a selected item in the combobox.
  789. // Parameters:
  790. //     id -         Resource ID for the control.
  791. //     memberFxn -  Name of member function to handle the message.
  792. // See Also:
  793. //     CXTPReportControl::OnConstraintSelecting()
  794. //-----------------------------------------------------------------------
  795. #define XTP_NM_REPORT_CONSTRAINT_SELECTING          (NM_FIRST-73)
  796. //-----------------------------------------------------------------------
  797. // Summary:
  798. //     Indicates the tooltip will be drawn.
  799. // Parameters:
  800. //     id -         Resource ID for the control.
  801. //     memberFxn -  Name of member function to handle the message.
  802. // See Also:
  803. //     CXTPReportControl::OnGetToolTipInfo()
  804. //-----------------------------------------------------------------------
  805. #define XTP_NM_REPORT_GETTOOLTIPINFO          (NM_FIRST-74)
  806. //-----------------------------------------------------------------------
  807. // Summary:
  808. //     Indicates the records were dropped to report control.
  809. // Parameters:
  810. //     id -         Resource ID for the control.
  811. //     memberFxn -  Name of member function to handle the message.
  812. // Remarks:
  813. //     XTP_NM_REPORTDRAGDROP structure passed with this message
  814. // See Also:
  815. //     XTP_NM_REPORTDRAGDROP, XTP_NM_REPORT_BEGINDRAG, XTP_NM_REPORT_DROP,
  816. //     XTP_NM_REPORT_DRAGDROP_COMPLETED
  817. //-----------------------------------------------------------------------
  818. #define XTP_NM_REPORT_RECORDS_DROPPED          (NM_FIRST-75)
  819. //-----------------------------------------------------------------------
  820. // Summary:
  821. //     Defines message for handling focus changing event.
  822. // Parameters:
  823. //     id -         Resource ID for the control.
  824. //     memberFxn -  Name of member function to handle the message.
  825. // Remarks:
  826. //     The XTP_NM_REPORT_FOCUS_CHANGING notification message is sent to inform
  827. //     the owner window that the focused row or column is about to be changed
  828. //     The owner window of the report control receives this notification
  829. //     through the WM_COMMAND message.
  830. // Example:
  831. //     Here is an example of how an application would handle this message.
  832. // <code>
  833. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  834. //     ON_NOTIFY(XTP_NM_REPORT_FOCUS_CHANGING, XTP_ID_REPORT_CONTROL, OnReportFocusChanging)
  835. // END_MESSAGE_MAP()
  836. //
  837. // void CReportSampleView::OnReportFocusChanging(NMHDR* pNMHDR, LRESULT* /*result*/)
  838. // {
  839. //     // TODO: Handle command.
  840. // }
  841. // </code>
  842. // See Also:
  843. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_HEADER_RCLICK,
  844. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN,
  845. //     XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED, XTP_NM_REPORT_SELCHANGED,
  846. //     XTP_NM_REPORT_FOCUS_CHANGED
  847. //     CXTPReportControl, CXTPReportHeader
  848. //-----------------------------------------------------------------------
  849. #define XTP_NM_REPORT_FOCUS_CHANGING         (NM_FIRST-76)
  850. //-----------------------------------------------------------------------
  851. // Summary:
  852. //     Indicates the user completed drag&drop operation.
  853. // Parameters:
  854. //     id -         Resource ID for the control.
  855. //     memberFxn -  Name of member function to handle the message.
  856. // Remarks:
  857. //     XTP_NM_REPORTDRAGDROP structure passed with this message
  858. // See Also:
  859. //     XTP_NM_REPORTDRAGDROP, XTP_NM_REPORT_BEGINDRAG, XTP_NM_REPORT_DROP,
  860. //     XTP_NM_REPORT_RECORDS_DROPPED
  861. //-----------------------------------------------------------------------
  862. #define XTP_NM_REPORT_DRAGDROP_COMPLETED     (NM_FIRST-77)
  863. //-----------------------------------------------------------------------
  864. // Summary:
  865. //     Defines message for in-place editing has just started.
  866. //     Send after XTP_NM_REPORT_REQUESTEDIT and when inplace editor
  867. //     has been created.
  868. // Parameters:
  869. //     id        -  Resource ID for the control.
  870. //     memberFxn -  Name of member function to handle the message.
  871. // Remarks:
  872. //     XTP_NM_REPORTRECORDITEM structure passed with this message
  873. // See Also:
  874. //     XTP_NM_REPORTRECORDITEM, XTP_NM_REPORT_VALUECHANGED,
  875. //     XTP_NM_REPORT_REQUESTEDIT,
  876. //     CXTPReportRecordItem::OnEditCanceled
  877. //-----------------------------------------------------------------------
  878. #define XTP_NM_REPORT_BEGINEDIT              (NM_FIRST-78)
  879. //-----------------------------------------------------------------------
  880. // Summary:
  881. //     Defines message for selected rows collection changing. Send for
  882. //     each row when it added/removed.
  883. // Parameters:
  884. //     id        -  Resource ID for the control.
  885. //     memberFxn -  Name of member function to handle the message.
  886. // Remarks:
  887. //     XTP_NM_SELECTION_CHANGING structure passed with this message
  888. // See Also:
  889. //     XTP_NM_SELECTION_CHANGING
  890. //-----------------------------------------------------------------------
  891. #define XTP_NM_REPORT_SELCHANGING           (NM_FIRST-80)
  892. //-----------------------------------------------------------------------
  893. // Summary:
  894. //     Indicates the user is dragging records over a control.
  895. // Parameters:
  896. //     id -         Resource ID for the control.
  897. //     memberFxn -  Name of member function to handle the message.
  898. // Remarks:
  899. //     XTP_NM_REPORTDRAGDROP structure passed with this message
  900. // See Also:
  901. //     XTP_NM_REPORTDRAGDROP, XTP_NM_REPORT_BEGINDRAG, XTP_NM_REPORT_DROP,
  902. //     XTP_NM_REPORT_RECORDS_DROPPED, XTP_NM_REPORT_DRAGDROP_COMPLETED
  903. //-----------------------------------------------------------------------
  904. #define XTP_NM_REPORT_DRAGOVER               (NM_FIRST-81)
  905. //-----------------------------------------------------------------------
  906. // Summary:
  907. //     Defines message for column group order changed event.
  908. // Parameters:
  909. //     id -         Resource ID for the control.
  910. //     memberFxn -  Name of member function to handle the message.
  911. // Remarks:
  912. //     The XTP_NM_REPORT_GROUPORDERCHANGED notification message is sent to inform
  913. //     the owner window that the user change the columns group order of report control.
  914. //     The owner window of the report control receives this notification
  915. //     threw the WM_COMMAND message.
  916. // Example:
  917. //     Here is an example of how an application would handle this message.
  918. // <code>
  919. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  920. //     ON_NOTIFY(XTP_NM_REPORT_GROUPORDERCHANGED, XTP_ID_REPORT_CONTROL, OnReportGroupOrderChanged)
  921. // END_MESSAGE_MAP()
  922. //
  923. // void CReportSampleView::OnReportGroupOrderChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  924. // {
  925. //     XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
  926. //     ASSERT(pItemNotify != NULL);
  927. //
  928. //     // TODO: Handle command.
  929. // }
  930. // </code>
  931. // See Also:
  932. //     XTP_NM_REPORT_CHECKED, XTP_NM_REPORT_HEADER_RCLICK,
  933. //     XTP_NM_REPORT_HYPERLINK, XTP_NM_REPORT_INPLACEBUTTONDOWN, XTP_NM_REPORT_SELCHANGED,
  934. //     XTP_NM_REPORT_COLUMNORDERCHANGED, XTP_NM_REPORT_SORTORDERCHANGED, XTP_NM_REPORT_VALUECHANGED,
  935. //     CXTPReportControl, CXTPReportHeader
  936. //-----------------------------------------------------------------------
  937. #define XTP_NM_REPORT_GROUPORDERCHANGED      (NM_FIRST-82)
  938. //-----------------------------------------------------------------------
  939. // Summary:
  940. //     Defines message for item button click event.
  941. // Parameters:
  942. //     id -         Resource ID for the control.
  943. //     memberFxn -  Name of member function to handle the message.
  944. // Remarks:
  945. //     The XTP_NM_REPORT_ITEMBUTTONCLICK notification message is sent to inform
  946. //     the owner window that the user click item button of report control
  947. //     The owner window of the report control receives this notification
  948. //     threw the WM_COMMAND message.
  949. // Returns:
  950. //     TRUE if message was processed; FALSE for default process.
  951. // Example:
  952. //     Here is an example of how an application would handle this message.
  953. // <code>
  954. // BEGIN_MESSAGE_MAP(CReportSampleView, CXTPReportView)
  955. //     ON_NOTIFY(XTP_NM_REPORT_ITEMBUTTONCLICK, XTP_ID_REPORT_CONTROL, OnReportItemButtonClick)
  956. // END_MESSAGE_MAP()
  957. //
  958. // void CReportSampleView::OnReportItemButtonClick(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
  959. // {
  960. //     XTP_NM_REPORTITEMCONTROL* pItemNotify = (XTP_NM_REPORTITEMCONTROL*) pNotifyStruct;
  961. //     ASSERT(pItemNotify->pItemControl);
  962. //
  963. //     // TODO: Handle command.
  964. // }
  965. // </code>
  966. // See Also:
  967. //     XTP_NM_REPORTITEMCONTROL
  968. //     CXTPReportRecordItemControl, CXTPReportRecordItemButton
  969. //-----------------------------------------------------------------------
  970. #define XTP_NM_REPORT_ITEMBUTTONCLICK     (NM_FIRST-83)
  971. #endif //#if !defined(__XTPREPORTDEFINES_H__)