SPPropertyGridDefines.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /********************************************
  2. ** 工作室:S&P工作室
  3. ** 作者 :张东斌
  4. ** 日期 :2007年6月
  5. *********************************************/
  6. #if !defined(__SPPROPERTYGRIDDEFINES_H__)
  7. #define __SPPROPERTYGRIDDEFINES_H__
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11. //-----------------------------------------------------------------------
  12. // Summary:
  13. // The XTWM_PROPERTYGRID_NOTIFY message is sent to the CSPPropertyGrid owner window
  14. // whenever an action occurs within the CSPPropertyGrid
  15. //
  16. // <code>XTWM_PROPERTYGRID_NOTIFY
  17. // nGridAction = (int) wParam; // Property grid action
  18. // pItem = (CSPPropertyGridItem*) lParam; // pointer to a CSPPropertyGridItem object</code>
  19. //
  20. // When the user performs an action in the property grid, the XTWM_PROPERTYGRID_NOTIFY message is
  21. // sent to the property grid's owner window.
  22. // Parameters:
  23. // nGridAction - Value of wParam specifies an value that indicates the user's
  24. // request .
  25. // pItem - The value of lParam points to a CSPPropertyGridItem object that contains information for the
  26. // specified item. This pointer should <b>never</b> be NULL.
  27. // Returns:
  28. // If the application is to process this message, the return value should be TRUE, otherwise the
  29. // return value is FALSE.
  30. // Remarks:
  31. // nGridAction parameter can be one of the following values:
  32. // * <b>SP_PGN_SORTORDER_CHANGED</b> The sort order has changed in the property grid.
  33. // * <b>SP_PGN_SELECTION_CHANGED</b> The selection has changed in the property grid.
  34. // * <b>SP_PGN_ITEMVALUE_CHANGED</b> The value has changed for pItem in the property grid.
  35. // * <b>SP_PGN_EDIT_CHANGED</b> The edit value has changed in the property grid.
  36. // * <b>SP_PGN_INPLACEBUTTONDOWN</b> Item's in-place button (combo or expand) down.
  37. // * <b>SP_PGN_ITEMEXPANDCHANGED</b> User expand or collapse item.
  38. // * <b>SP_PGN_DBLCLICK</b> The user double-clicks the left mouse button in the property grid.
  39. // * <b>SP_PGN_RCLICK</b> The user pressed the right mouse button in the property grid.
  40. // * <b>SP_PGN_VERB_CLICK</b> The user click verb in the property grid.
  41. //
  42. // Example:
  43. // Here is an example of how an application would process the XTWM_PROPERTYGRID_NOTIFY
  44. // message.
  45. //
  46. // <code>
  47. // int nGridAction = (int)wParam;
  48. //
  49. // // Cast the lParam to an CSPPropertyGridItem* object pointer.
  50. // CSPPropertyGridItem* pItem = (CSPPropertyGridItem*)lParam;
  51. // ASSERT(pItem);
  52. //
  53. // switch (nGridAction)
  54. // {
  55. // case SP_PGN_SORTORDER_CHANGED:
  56. // {
  57. // m_nSort = m_wndSPPropertyGrid.GetPropertySort();
  58. // UpdateData(FALSE);
  59. // }
  60. // break;
  61. // case SP_PGN_ITEMVALUE_CHANGED:
  62. // {
  63. // TRACE(_T("Value Changed. Caption = %s, ID = %i, Value = %s\n"),
  64. // pItem->GetCaption(), pItem->GetID(), pItem->GetValue());
  65. // }
  66. // break;
  67. // case SP_PGN_SELECTION_CHANGED:
  68. // {
  69. // TRACE(_T("Selection Changed. Item = %s\n"), pItem->GetCaption());
  70. // }
  71. // break;
  72. // }
  73. // return FALSE;
  74. // </code>
  75. //-----------------------------------------------------------------------
  76. const UINT SPWM_PROPERTYGRID_NOTIFY = ( WM_APP + 2533 );
  77. const UINT SP_PGN_SORTORDER_CHANGED = 1; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  78. const UINT SP_PGN_SELECTION_CHANGED = 2; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  79. const UINT SP_PGN_ITEMVALUE_CHANGED = 3; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  80. const UINT SP_PGN_EDIT_CHANGED = 4; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  81. const UINT SP_PGN_INPLACEBUTTONDOWN = 5; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  82. const UINT SP_PGN_DRAWITEM = 6; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  83. const UINT SP_PGN_ITEMEXPANDCHANGED = 7; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  84. const UINT SP_PGN_DBLCLICK = 8; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  85. const UINT SP_PGN_RCLICK = 9; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  86. const UINT SP_PGN_VERB_CLICK = 10; //<ALIAS SPWM_PROPERTYGRID_NOTIFY>
  87. //-----------------------------------------------------------------------
  88. // Summary:
  89. // Apply this style to the property grid to use the owner draw feature.
  90. // See Also:
  91. // CSPPropertyGrid::Create
  92. // Example:
  93. // The following example illustrates using SP_PGS_OWNERDRAW:
  94. // <code>
  95. // m_wndPropertyGrid.ModifyStyle(0, SP_PGS_OWNERDRAW);
  96. // </code>
  97. //-----------------------------------------------------------------------
  98. const UINT SP_PGS_OWNERDRAW = 0x0010L;
  99. #endif //#define __SPPROPERTYGRIDDEFINES_H__