/** * @file XTPGridDefines.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPGRIDDEFINES_H__) # define __XTPGRIDDEFINES_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" # ifdef _XTP_ACTIVEX enum XTPEnumGridCustomDraw { xtpCustomDrawItem = 0x01, xtpCustomMeasureRow = 0x02, xtpCustomBeforeDrawRow = 0x04, xtpCustomDrawPreviewItem = 0x08, xtpCustomMeasurePreviewItem = 0x10, }; # endif /** * @brief * This enum defines the shell icons. */ enum XTPGridShellIcon { xtpGridShellIconLock = 47 /**< Specifies a Lock icon */ }; /** * @brief * This enum defines the index of the glyphs. */ enum XTPGridGlyph { xtpGridGlyphInvalid = -1, /**< Specifies an invalid glyph. */ xtpGridGlyphRowCollapse = 0, /**< Specifies a row collapse glyph. */ xtpGridGlyphRowExpand = 1, /**< Specifies a row expand glyph. */ xtpGridGlyphEnabledUnchecked = 2, /**< Specifies an enabled unchecked glyph. */ xtpGridGlyphEnabledChecked = 3, /**< Specifies an enabled checked glyph. */ xtpGridGlyphDisabledUnchecked = 4, /**< Specifies a disabled unchecked glyph. */ xtpGridGlyphDisabledChecked = 5, /**< Specifies a disabled checked glyph. */ xtpGridGlyphColumnExpand = 6, /**< Specifies a column expand glyph. */ xtpGridGlyphColumnRestore = 7, /**< Specifies a column restore glyph. */ xtpGridGlyphEnabledTristate = 8, /**< Specifies an enabled tristate glyph. */ xtpGridGlyphItemLocked = 9, /**< Specifies a locked item glyph. */ xtpGridGlyphItemUnlocked = 10, /**< Specifies an unlocked item glyph. */ xtpGridGlyphCount /**< The number of the glyphs. */ }; /** * @brief * This enum defines the possible checkbox states. */ enum XTPGridCheckState { xtpGridCheckStateInvalid = -1, /**< The checkbox state is invalid. */ xtpGridCheckStateUnchecked = 0, /**< The checkbox is in an unchecked state. */ xtpGridCheckStateChecked = 1, /**< The checkbox is in a checked state. */ xtpGridCheckStateIndeterminate = 2, /**< The checkbox is in an indeterminate state.*/ xtpGridCheckStateCount = 3 /**< Number of checkbox states. */ }; /** * @brief * This enum defines body, header, and footer rows. * @see * CXTPGridRow::m_nRowType */ enum XTPGridRowType { xtpRowTypeInvalid = -1, /**< Indicates an invalid row type. */ xtpRowTypeBody = 0, /**< The row is in the body rows collection. */ xtpRowTypeHeader = 1, /**< The row is in the header rows collection.*/ xtpRowTypeFooter = 2 /**< The row is in the footer rows collection.*/ }; /** * @brief * Enumeration of orientations. * @see * SetGridStyle */ enum XTPGridOrientation { xtpGridOrientationHorizontal = 0, /**< Specifies horizontal grid orientation */ xtpGridOrientationVertical = 1, /**< Specifies vertical grid orientation */ xtpGridOrientationAll = 2 /**< Specifies both horizontal and vertical grid orientations */ }; /** * @brief * Represents predefined grid line styles. * * Example: *
m_wndGrid.SetGridStyle(FALSE, xtpGridGridLargeDots);
* @see * CXTPGridControl::SetGridStyle, * xtpGridGridNoLines, xtpGridGridSmallDots, xtpGridGridLargeDots, * xtpGridGridDashes, xtpGridGridSolid */ enum XTPGridLineStyle { xtpGridLineStyleNone = 0, /**< No line. */ xtpGridLineStyleDotSmall = 1, /**< Line is drawn with small dots. */ xtpGridLineStyleDotLarge = 2, /**< Line is drawn with large dots. */ xtpGridLineStyleDash = 3, /**< Line is drawn with dashes. */ xtpGridLineStyleSolid = 4, /**< Solid line. */ xtpGridLineStyleCount = 5, /**< Number of line styles. */ // Old names xtpGridGridNoLines = xtpGridLineStyleNone, /**< Deprecated. Same as xtpGridLineStyleNone */ xtpGridGridSmallDots = xtpGridLineStyleDotSmall, /**< Deprecated. Same as xtpGridLineStyleDotSmall */ xtpGridGridLargeDots = xtpGridLineStyleDotLarge, /**< Deprecated. Same as xtpGridLineStyleDotLarge */ xtpGridGridDashes = xtpGridLineStyleDash, /**< Deprecated. Same as xtpGridLineStyleDash */ xtpGridGridSolid = xtpGridLineStyleSolid /**< Deprecated. Same as xtpGridLineStyleSolid */ }; typedef XTPGridLineStyle XTPGridGridStyle; /** * @brief * Represents predefined freeze column line styles. */ enum XTPGridFreezeColsDividerStyle { xtpGridFreezeColsDividerThin = 0x01, /**< Thin line style.*/ xtpGridFreezeColsDividerBold = 0x02, /**< Bold line style.*/ xtpGridFreezeColsDividerHeader = 0x04, /**< Header line style.*/ xtpGridFreezeColsDividerShade = 0x08, /**< Shade line style.*/ xtpGridFreezeColsDividerShowAlways = 0x10, /**< Show event if AutoColumnSizing is On.*/ }; /** @cond */ // deprecated # define xtpGridNoLines xtpGridGridNoLines # define xtpGridSmallDots xtpGridGridSmallDots # define xtpGridLargeDots xtpGridGridLargeDots # define xtpGridDashes xtpGridGridDashes # define xtpGridSolid xtpGridGridSolid /** @endcond */ /** * @brief * Represents predefined column styles. * * Example: *
m_wndGrid.GetPaintManager()->m_columnStyle = xtpGridColumnFlat;
* @see * CXTPGridPaintManager::m_columnStyle, CXTPGridPaintManager, * xtpGridColumnShaded, xtpGridColumnFlat */ enum XTPGridColumnStyle { xtpGridColumnShaded, /**< Columns are gray shaded.*/ xtpGridColumnFlat, /**< Flat style for drawing columns.*/ xtpGridColumnExplorer, /**< Explorer column style.*/ xtpGridColumnOffice2003, /**< Gradient column style.*/ xtpGridColumnResource /**< Office 2007/2010 column style.*/ }; /** @cond */ // deprecated # define xtpColumnShaded xtpGridColumnShaded # define xtpColumnFlat xtpGridColumnFlat # define xtpGridColumnOffice2007 xtpGridColumnResource /** @endcond */ /** * @brief * Represent the style of lines used to draw a hierarchical tree structure. * * Example: *
m_wndGrid.GetPaintManager()->m_treeStructureStyle =
 * xtpGridTreeStructureSolid;
* @see * CXTPGridPaintManager::m_treeStructureStyle, CXTPGridPaintManager, * xtpGridTreeStructureNone, xtpGridTreeStructureSolid */ enum XTPGridTreeStructureStyle { xtpGridTreeStructureNone, /**< No lines will be drawn from the parent node to each child node. */ xtpGridTreeStructureSolid, /**< Lines will be drawn from the parent node to each child node at the next level. */ xtpGridTreeStructureDots /**< Dots will be drawn from the parent node to each child node at the next level. */ }; /** * @brief * Represent the header/footer rows divider style. */ enum XTPGridSectionDividerStyle { xtpGridSectionDividerStyleNone = 0x00, /**< No line. */ xtpGridSectionDividerStyleThin = 0x01, /**< Thin style. */ xtpGridSectionDividerStyleBold = 0x02, /**< Bold style. */ xtpGridSectionDividerStyleShade = 0x04, /**< Shaded line style. */ xtpGridSectionDividerStyleOutlook = 0x08, /**< Outlook line style. */ /** @cond */ // Deprecated xtpGridFixedRowsDividerNone = xtpGridSectionDividerStyleNone, xtpGridFixedRowsDividerThin = xtpGridSectionDividerStyleThin, xtpGridFixedRowsDividerBold = xtpGridSectionDividerStyleBold, xtpGridFixedRowsDividerShade = xtpGridSectionDividerStyleShade, xtpGridFixedRowsDividerOutlook = xtpGridSectionDividerStyleOutlook /** @endcond */ }; /** @cond */ // Old enum name typedef XTPGridSectionDividerStyle XTPGridFixedRowsDividerStyle; /** @endcond */ /** * @brief * Section divider position. */ enum XTPGridSectionDividerPosition { xtpGridSectionDividerPositionTop = 0, /**< Divider above the section.*/ xtpGridSectionDividerPositionBottom = 1 /**< Divider below the section.*/ }; /** * @brief * Represent the Grid Draw Sort Triangle logic. */ enum XTPGridDrawSortTriangleStyle { xtpGridDrawSortTriangleDefault = 0, /**< The triangle will be removed when the column size is too small to display the full caption and triangle. */ xtpGridDrawSortTriangleAlways = 1, /**< The sort triangle displayed in column header when a column is sorted and the caption will be cut with ellipsis. */ xtpGridDrawSortTriangleNever = 2 /**< Never draw the triangle. */ }; /** * @brief * Enumeration of hyperlink text decorations. * * @see xtpGridTextDecorationNone, xtpGridTextDecorationUnderline> */ enum XTPGridTextDecoration { xtpGridTextDecorationNone = 0, /**< Text has no decoration. */ xtpGridTextDecorationUnderline = 1 /**< Text is underlined. */ }; /** * @brief * Visual theme enumeration. * * Example: *
 m_wndGridControl.SetTheme(xtpGridThemeOffice2013); 
* @see * CXTPGridControl::SetTheme, CXTPGridControl::GetCurrentTheme */ enum XTPGridPaintTheme { xtpGridThemeDefault, /**< Default theme. */ xtpGridThemeOfficeXP, /**< Office XP style theme. */ xtpGridThemeOffice2003, /**< Office 2003 style theme. */ xtpGridThemeOffice2003Luna, /**< Office 2003 style theme with luna colors.*/ xtpGridThemeOffice2013, /**< Office 2013 style theme. */ xtpGridThemeOffice2016 = xtpGridThemeOffice2013, /**< Office 2016 style theme. */ xtpGridThemeVisualStudio2012Light, /**< Visual Studio 2012 Light style theme. */ xtpGridThemeVisualStudio2012Dark, /**< Visual Studio 2012 Dark style theme. */ xtpGridThemeVisualStudio2012Blue, /**< Visual Studio 2012 Blue style theme. */ xtpGridThemeVisualStudio2015, /**< Visual Studio 2015 style theme. */ xtpGridThemeExplorer, /**< Windows Explorer theme. */ xtpGridThemeResource, /**< Resource .DLL style theme. */ xtpGridThemeNativeWindows10, /**< Windows 10 style theme. */ xtpGridThemeVisualStudio2017, /**< Visual Studio 2017 style theme. */ xtpGridThemeVisualStudio2019, /**< Visual Studio 2019 style theme. */ xtpGridThemeVisualStudio2022, /**< Visual Studio 2022 style theme. */ xtpGridThemeNativeWindows11, /**< Windows 11 style theme. */ }; /** * @brief * A NULL-terminated string used by CXTPGridControl which specifies * the window class name for the Grid control. * * Example: * *
 * BOOL CXTPGridControl::RegisterWindowClass()
 * {
 *    WNDCLASS wndcls;
 *    HINSTANCE hInst = XTPGetInstanceHandle();
 *
 *    if (!(GetClassInfo(hInst, XTPGRIDCTRL_CLASSNAME, &wndcls)))
 *    {
 *       // otherwise we need to register a new class
 *       wndcls.style            = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
 *       wndcls.lpfnWndProc      = DefWindowProc;
 *       wndcls.cbClsExtra       = wndcls.cbWndExtra = 0;
 *       wndcls.hInstance        = hInst;
 *       wndcls.hIcon            = NULL;
 *       wndcls.hCursor          = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
 *       wndcls.hbrBackground    = (HBRUSH) (COLOR_3DFACE + 1);
 *       wndcls.lpszMenuName     = NULL;
 *       wndcls.lpszClassName    = XTPGRIDCTRL_CLASSNAME;
 *
 *       if (!AfxRegisterClass(&wndcls))
 *       {
 *          AfxThrowResourceException();
 *          return FALSE;
 *       }
 *    }
 *
 *    return TRUE;
 * }
 * 
* * @see * CXTPGridControl::RegisterWindowClass */ const TCHAR XTPGRIDCTRL_CLASSNAME[] = _T("XTPGrid"); const TCHAR XTPTRACKCTRL_CLASSNAME[] = _T("XTPTrackControl"); /** * @brief * Grid control records clipboard format name. */ static const LPCTSTR XTPGRIDCTRL_CF_RECORDS = _T("XTPGrid_CF_Records"); /** * @brief * This constant indicates that a COLORREF is not defined. * * Example: *
 * void CXTPGridRecordItem::GetItemMetrics(
 * XTP_GRIDRECORDITEM_DRAWARGS* pDrawArgs,
 * XTP_GRIDRECORDITEM_METRICS* pItemMetrics)
 * {
 *    if (m_clrBackground != XTP_GRID_COLOR_DEFAULT)
 *       pItemMetrics->clrBackground = m_clrBackground;
 *
 *    if (m_clrText != XTP_GRID_COLOR_DEFAULT)
 *       pItemMetrics->clrForeground = m_clrText;
 *
 *    if (m_pFontCaption != NULL)
 *       pItemMetrics->pFont = m_pFontCaption;
 *
 *    else if (m_bBoldText)
 *       pItemMetrics->pFont =
 *       &pDrawArgs->pControl->GetPaintManager()->m_fontBoldText;
 * }
 * 
* @see * CXTPGridRecordItem, CXTPGridRow */ const COLORREF XTP_GRID_COLOR_DEFAULT = (COLORREF)-1; /** * @brief * This constant indicates that an icon ID is not defined. * * Example: *
 * m_wndGrid.AddColumn(new CXTPGridColumn(COLUMN_PRICE, _T("Price"),
 * 80, TRUE, XTP_GRID_NOICON, TRUE, FALSE));
 * 
* @see * CXTPGridColumn */ const int XTP_GRID_NOICON = (int)-1; /** * @brief * Defines the message for the column right clicked event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_HEADER_RCLICK notification message is sent to inform the * owner window that the user right clicked a column of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_HEADER_RCLICK, XTP_ID_GRID_CONTROL, OnGridColumnRClick)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridColumnRClick(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*)pNotifyStruct;
 *    _ASSERTE(pItemNotify->pColumn);
 *    CPoint ptClick = pItemNotify->pt;
 *
 *    // Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_HEADER_RCLICK (NM_FIRST - 51) /** * @brief * Defines the message for the row selection changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_SELCHANGED notification message is sent to inform the * owner window that the user selected a row of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_SELCHANGED, XTP_ID_GRID_CONTROL, OnGridSelChanged)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridSelChanged(NMHDR* pNMHDR, LRESULT* result)
 * {
 *    // Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_SELCHANGED (NM_FIRST - 52) /** * @brief * Defines the message for the item checked event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_CHECKED notification message is sent to inform the * owner window that the user clicked the check box of an item of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_CHECKED, XTP_ID_GRID_CONTROL, OnGridCheckItem)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridCheckItem(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*) pNotifyStruct;
 *    _ASSERTE(pItemNotify != NULL);
 *
 *    // Handle command.
 * }
 * 
* @see * XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_CHECKED (NM_FIRST - 53) /** * @brief * Defines the message for the hyperlink clicked event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_HYPERLINK notification message is sent to inform the * owner window that the user clicked the hyperlink of an item. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_HYPERLINK, XTP_ID_GRID_CONTROL, OnGridHyperlinkClick)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridHyperlinkClick(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*) pNotifyStruct;
 *
 * 		if (!pItemNotify->pRow || !pItemNotify->pColumn)
 * 			return;
 *
 * 		// if click on Hyperlink in Item
 * 		if (pItemNotify->nHyperlink >= 0)
 * 			{
 * 			TRACE(_T("Hyperlink Click : \n row %d \n col %d \n Hyperlink %d.\n"),
 * 			pItemNotify->pRow->GetIndex(),
 * 			pItemNotify->pColumn->GetItemIndex(),
 * 			pItemNotify->nHyperlink);
 * 			}
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_HYPERLINK (NM_FIRST - 54) /** * @brief * Defines the message for the column order changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_COLUMNORDERCHANGED notification message is sent to inform the * owner window that the user changed the order of columns of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_COLUMNORDERCHANGED, XTP_ID_GRID_CONTROL,
 * OnGridColumnOrderChanged)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridColumnOrderChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDCOLUMNORDERCHANGED* pItemNotify = (XTP_NM_GRIDCOLUMNORDERCHANGED*)
 * 		pNotifyStruct; _ASSERTE(pItemNotify != NULL);
 *
 * 		// Handle command.
 * 	}
 * 	
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_GROUPORDERCHANGED, XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_COLUMNORDERCHANGED (NM_FIRST - 55) /** * @brief * Defines the message for the sort order changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_SORTORDERCHANGED notification message is sent to inform the * owner window that the user clicked the header of the Grid control * and changed the sort order. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * 	BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * 	ON_NOTIFY(XTP_NM_GRID_SORTORDERCHANGED, XTP_ID_GRID_CONTROL, OnGridSortOrderChanged)
 * 	END_MESSAGE_MAP()
 *
 * 	void CGridSampleView::OnGridSortOrderChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * 	{
 * 		//pNotifyStruct doesn't consist information about column which was clicked.
 * 		//To get column use XTP_NM_GRID_COLUMNORDERCHANGED notification.
 *
 * 		// Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_SORTORDERCHANGED (NM_FIRST - 56) /** * @brief * Defines the message when a column header has been clicked and the sort order * has changed, but CXTPGridControl::Populate has NOT yet been called. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_PRESORTORDERCHANGED notification message is sent to inform the * owner window that the user clicked the header of the Grid control and that * the sort order will change. XTP_NM_GRID_PRESORTORDERCHANGED is sent before the * CXTPGridControl::Populate method has been called. As such, the order of rows * has not been visibly changed yet. After the CXTPGridControl:Populate method is * called, the XTP_NM_GRID_SORTORDERCHANGED notification is sent to inform the * owner window that the visible order of rows has actually changed. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_VALUECHANGED, XTP_NM_GRID_SORTORDERCHANGED * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_PRESORTORDERCHANGED (NM_FIRST - 67) /** * @brief * Defines the message for the value changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_VALUECHANGED notification message is sent to inform the * owner window that the user changed a value of a grid cell. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. *
 * BEGIN_MESSAGE_MAP(CPropertiesView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_VALUECHANGED, ID_GRID_CONTROL, OnGridValueChanged)
 * END_MESSAGE_MAP()
 *
 * void CPropertiesView::OnGridValueChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*) pNotifyStruct;
 *    _ASSERTE(pItemNotify != NULL);
 *
 *    switch (pItemNotify->pItem->GetItemData())
 *    {
 *       case ID_PROPERTY_MULTIPLESELECTION:
 *          GetTargetGrid()->SetMultipleSelection(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_PREVIEWMODE:
 *          GetTargetGrid()->EnablePreviewMode(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          GetTargetGrid()->Populate();
 *          break;
 *       case ID_PROPERTY_GROUPBOXVISIBLE:
 *          GetTargetGrid()->ShowGroupBy(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_FOCUSSUBITEMS:
 *          GetTargetGrid()->FocusSubItems(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_ALLOWCOLUMNREMOVE:
 *          GetTargetGrid()->GetGridHeader()->AllowColumnRemove(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_ALLOWCOLUMNREORDER:
 *          GetTargetGrid()->GetGridHeader()->AllowColumnReorder(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_ALLOWCOLUMNRESIZE:
 *          GetTargetGrid()->GetGridHeader()->AllowColumnResize(
 *          CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_FLATHEADER:
 *          GetTargetGrid()->GetPaintManager()->m_columnStyle =
 *          (CRecordPropertyBool::GetValue(pItemNotify)) ? xtpGridColumnFlat :
 *          xtpGridColumnShaded;
 *          break;
 *       case ID_PROPERTY_HIDESELECTION:
 *          GetTargetGrid()->GetPaintManager()->m_bHideSelection =
 *       (CRecordPropertyBool::GetValue(pItemNotify));
 *          break;
 *       case ID_PROPERTY_TREEINDENT:
 *          GetTargetGrid()->GetPaintManager()->m_nTreeIndent =
 *          CRecordPropertyInt::GetValue(pItemNotify);
 *       GetTargetGrid()->RedrawControl();
 *          break;
 *    }
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_VALUECHANGED (NM_FIRST - 57) /** * @brief * Defines the message for the in-place button clicked event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_INPLACEBUTTONDOWN notification message is sent to inform the * owner window that the user clicked the in-place button of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * @return * TRUE if this message was processed, FALSE for default process. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_ID_GRID_CONTROL, OnGridButtonClick)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridButtonClick(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDINPLACEBUTTON* pItemNotify = (XTP_NM_GRIDINPLACEBUTTON*) pNotifyStruct;
 * 		_ASSERTE(pItemNotify->pButton);
 *
 * 		// Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_INPLACEBUTTONDOWN (NM_FIRST - 58) /** * @brief * Defines the message for the row expand changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_ROWEXPANDED notification message is sent to inform the * owner window that the user expanded or collapsed a row of the Grid control. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_ROWEXPANDED, XTP_ID_GRID_CONTROL, OnGridRowExpandChanged)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridRowExpandChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*) pNotifyStruct;
 * 		_ASSERTE(pItemNotify != NULL);
 *
 * 		// Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_ROWEXPANDED (NM_FIRST - 59) /** * @brief * Defines the message for the left mouse button clicked event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_LBUTTONDOWN notification message is sent to inform the * owner window that the user left clicked a row. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_LBUTTONDOWN, XTP_ID_GRID_CONTROL, OnGridLButtonDown)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridLButtonDown(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDRECORDITEM* pItemNotify = (XTP_NM_GRIDRECORDITEM*) pNotifyStruct;
 * 		_ASSERTE(pItemNotify != NULL);
 *
 * 		// Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_LBUTTONDOWN (NM_FIRST - 60) # define XTP_NM_GRID_LBUTTONUP (NM_FIRST - 89) /** * @brief * Defines the message for handling the CXTPGridControl::GetItemMetrics() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_GETITEMMETRICS notification message is sent to allow the * owner window to customize item drawing. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. * *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_GETITEMMETRICS, XTP_ID_GRID_CONTROL, OnGridGetItemMetrics)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridGetItemMetrics(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDITEMMETRICS* pItemNotify = (XTP_NM_GRIDITEMMETRICS*)pNotifyStruct;
 *
 * 		_ASSERTE(pItemNotify->pDrawArgs);
 * 		_ASSERTE(pItemNotify->pDrawArgs->pControl);
 * 		_ASSERTE(pItemNotify->pDrawArgs->pRow);
 *
 * 		//     pItemNotify->pDrawArgs->pColumn   may be NULL (for a group row)
 * 		//     pItemNotify->pDrawArgs->pItem     may be NULL (for a group row)
 *
 * 		_ASSERTE(pItemNotify->pItemMetrics);
 *
 * 		// customize members of pItemNotify->pItemMetrics.
 * }
 * 
* * @see * CXTPGridControl, CXTPGridControl::GetItemMetrics() */ # define XTP_NM_GRID_GETITEMMETRICS (NM_FIRST - 61) /** * @brief * Defines the message for handling the CXTPGridControl::OnRequestEdit() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_REQUESTEDIT notification message is sent to notify the * owner window that an item has entered edit mode. * This message is send when an editable item starts to be edited or when a * check box item is checked/unchecked. * @see * CXTPGridControl, CXTPGridControl::OnRequestEdit() */ # define XTP_NM_GRID_REQUESTEDIT (NM_FIRST - 62) /** * @brief * Defines the message for handling the CXTPGridControl::OnBeforeCopyToText() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_BEFORE_COPY_TOTEXT notification message is sent to allow the * owner window to customize copy/paste operations. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_BEFORE_COPY_TOTEXT, XTP_ID_GRID_CONTROL, OnBeforeCopyToText)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnBeforeCopyToText(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		_ASSERTE(pNotifyStruct);
 *
 * 		XTP_NM_GRID_BEFORE_COPYPASTE* pnmCopyPaste = (XTP_NM_GRID_BEFORE_COPYPASTE*)pNotifyStruct;
 *
 * 		if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !*pnmCopyPaste->ppRecord ||
 * 			!pnmCopyPaste->parStrings)
 * 				{
 * 					_ASSERTE(FALSE);
 * 					return;
 * 				}
 *
 * 		// customize data provided by pnmCopyPaste->parStrings
 * 		// you can use source record object: (*pnmCopyPaste->ppRecord)->Member()
 *
 * 		// set result to not zero to cancel operation:
 * 		// *result = (LRESULT)TRUE;
 * }
 * 
* @see * CXTPGridControl, CXTPGridControl::OnBeforeCopyToText() */ # define XTP_NM_GRID_BEFORE_COPY_TOTEXT (NM_FIRST - 63) /** * @brief * Defines the message for handling the CXTPGridControl::OnBeforePasteFromText() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_BEFORE_PASTE_FROMTEXT notification message is sent to allow the * owner window to customize copy/paste operations. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_BEFORE_PASTE_FROMTEXT, XTP_ID_GRID_CONTROL,
 * OnGridBeforePasteFromText)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridBeforePasteFromText(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *		_ASSERTE(pNotifyStruct);
 *
 *		XTP_NM_GRID_BEFORE_COPYPASTE* pnmCopyPaste =
 *		(XTP_NM_GRID_BEFORE_COPYPASTE*)pNotifyStruct;
 *
 *		if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !pnmCopyPaste->parStrings) {
 *			_ASSERTE(FALSE);
 *			return;
 *			}
 *
 *		CMessageRecord* pRecord = new CMessageRecord();
 *		if (!pRecord) {
 *			return;
 * 			}
 *
 * 		*pnmCopyPaste->ppRecord = pRecord;
 *
 * 		CXTPGridColumns* pColumns = GetGridCtrl().GetColumns();
 * 		_ASSERTE(pColumns);
 * 		if (!pColumns) {
 * 			return;
 *			}
 *
 * 		int nDataCount = pnmCopyPaste->parStrings->GetSize();
 *
 * 		const int nColumnCount = pColumns->GetVisibleColumnsCount();
 * 		for (int nCol = 0; nCol < nColumnCount; nCol++)
 * 		{
 * 			CXTPGridColumn* pColumn = pColumns->GetVisibleAt(nCol);
 * 			CXTPGridRecordItem* pItem = pRecord->GetItem(pColumn);
 * 			_ASSERTE(pItem);
 * 			if (NULL == pItem)
 * 				continue;
 *
 * 			if (nCol < nDataCount)
 * 				{
 * 				CString strItem = pnmCopyPaste->parStrings->GetAt(nCol);
 * 				pItem->SetCaption(strItem);
 * 				}
 * 		}
 * 		// set result to not zero to cancel operation:
 * 		// *result = (LRESULT)TRUE;
 * }
 * 
* @see * CXTPGridControl, CXTPGridControl::OnBeforePasteFromText() */ # define XTP_NM_GRID_BEFORE_PASTE_FROMTEXT (NM_FIRST - 64) /** * @brief * Defines the message for handling the CXTPGridControl::OnBeforePaste() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_BEFORE_PASTE notification message is sent to allow the * owner window to customize copy/paste operations. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_BEFORE_PASTE, XTP_ID_GRID_CONTROL, OnBeforePaste)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnBeforePaste(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    _ASSERTE(pNotifyStruct);
 *
 *    XTP_NM_GRID_BEFORE_COPYPASTE* pnmCopyPaste = (XTP_NM_GRID_BEFORE_COPYPASTE*)pNotifyStruct;
 *    _ASSERTE(pnmCopyPaste && pnmCopyPaste->parStrings == NULL);
 *
 *    if (!pnmCopyPaste || !pnmCopyPaste->ppRecord || !*pnmCopyPaste->ppRecord) {
 *       _ASSERTE(FALSE);
 *       return;
 *    }
 *
 *    // you can create new or change provided record using pnmCopyPaste->ppRecord
 *
 *    // set result to not zero to cancel operation:
 *    // *result = (LRESULT)TRUE;
 * }
 * 
* @see * CXTPGridControl, CXTPGridControl::OnBeforePaste() */ # define XTP_NM_GRID_BEFORE_PASTE (NM_FIRST - 65) /** @cond */ // Internal Trace operation # define XTP_TRACE /** @endcond */ # ifdef _XTP_ACTIVEX /** @cond */ # define XTP_NM_GRID_VALUECHANGING (NM_FIRST - 66) /** @endcond */ # endif /** * @brief * Defines the message for handling the CXTPGridHeader::AdjustColumnsWidth() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_COLUMNWIDTHCHANGED notification message is sent when * the width of a column is changed. This can happen when the user changes * the width or when the Grid control automatically changes the width. * @see * CXTPGridHeader, CXTPGridHeader::AdjustColumnsWidth */ # define XTP_NM_GRID_COLUMNWIDTHCHANGED (NM_FIRST - 68) /** * @brief * Defines the message for handling the CXTPGridControl::OnPreviewKeyDown() method. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * This notification is sent to the Main window in a WM_NOTIFY message before * processing the OnKeyDown event. * @see * CXTPGridControl::OnPreviewKeyDown, XTP_NM_GRIDPREVIEWKEYDOWN, * CXTPGridControl::OnKeyDown, CWnd::OnKeyDown. */ # define XTP_NM_GRID_PREVIEWKEYDOWN (NM_FIRST - 69) /** * @brief * Indicates that the user started dragging records. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDDRAGDROP structure is passed with this message. * @see * XTP_NM_GRIDDRAGDROP, XTP_NM_GRID_BEGINDRAG, XTP_NM_GRID_DROP, * XTP_NM_GRID_RECORDS_DROPPED, XTP_NM_GRID_DRAGDROP_COMPLETED */ # define XTP_NM_GRID_BEGINDRAG (NM_FIRST - 70) /** * @brief * Indicates that the user dropped records to the Grid control. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDDRAGDROP structure is passed with this message. * @see * XTP_NM_GRIDDRAGDROP, XTP_NM_GRID_BEGINDRAG, * XTP_NM_GRID_RECORDS_DROPPED, XTP_NM_GRID_DRAGDROP_COMPLETED */ # define XTP_NM_GRID_DROP (NM_FIRST - 71) # define XTP_NM_GRID_HASVALIDDROPTYPE (NM_FIRST - 85) # define XTP_NM_GRID_VALIDDROPTARGET (NM_FIRST - 86) /** * @brief * Defines the message for the in-place editing has been canceled and * the value has not been changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDRECORDITEM structure is passed with this message. * @see * XTP_NM_GRIDRECORDITEM, XTP_NM_GRID_VALUECHANGED, * CXTPGridRecordItem::OnEditCanceled */ # define XTP_NM_GRID_EDIT_CANCELED (NM_FIRST - 72) /** * @brief * Indicates that the user changed a selected item in a combobox. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @see * CXTPGridControl::OnConstraintSelecting() */ # define XTP_NM_GRID_CONSTRAINT_SELECTING (NM_FIRST - 73) /** * @brief * Indicates that a tooltip will be drawn. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @see * CXTPGridControl::OnGetToolTipInfo() */ # define XTP_NM_GRID_GETTOOLTIPINFO (NM_FIRST - 74) /** * @brief * Indicates that records were dropped to the Grid control. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDDRAGDROP structure is passed with this message. * @see * XTP_NM_GRIDDRAGDROP, XTP_NM_GRID_BEGINDRAG, XTP_NM_GRID_DROP, * XTP_NM_GRID_DRAGDROP_COMPLETED */ # define XTP_NM_GRID_RECORDS_DROPPED (NM_FIRST - 75) /** * @brief * Defines the message for handling the focus changing event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_FOCUS_CHANGING notification message is sent to inform the * owner window that the focused row or column is about to be changed. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_FOCUS_CHANGING, XTP_ID_GRID_CONTROL, OnGridFocusChanging)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridFocusChanging(NMHDR* pNMHDR, LRESULT* result)
 * {
 *    // Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, * XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_FOCUS_CHANGED * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_FOCUS_CHANGING (NM_FIRST - 76) /** * @brief * Indicates that the user completed a drag-and-drop operation. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDDRAGDROP structure is passed with this message. * @see * XTP_NM_GRIDDRAGDROP, XTP_NM_GRID_BEGINDRAG, XTP_NM_GRID_DROP, * XTP_NM_GRID_RECORDS_DROPPED */ # define XTP_NM_GRID_DRAGDROP_COMPLETED (NM_FIRST - 77) /** * @brief * Defines the message for starting in-place editing. * Sent after XTP_NM_GRID_REQUESTEDIT and when the in-place editor * has been created. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDRECORDITEM structure is passed with this message. * @see * XTP_NM_GRIDRECORDITEM, XTP_NM_GRID_VALUECHANGED, * XTP_NM_GRID_REQUESTEDIT, * CXTPGridRecordItem::OnEditCanceled */ # define XTP_NM_GRID_BEGINEDIT (NM_FIRST - 78) # ifdef _XTP_ACTIVEX /** @cond */ # define XTP_NM_GRID_EDIT_CHANGING (NM_FIRST - 79) /** @endcond */ # endif /** * @brief * Defines the message for changing the selected rows collection. * Sent for each row when it is added/removed. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_SELECTION_CHANGING structure is passed with this message. * @see * XTP_NM_SELECTION_CHANGING */ # define XTP_NM_GRID_SELCHANGING (NM_FIRST - 80) /** * @brief * Indicates that the user is dragging records over a control. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * An XTP_NM_GRIDDRAGDROP structure is passed with this message. * @see * XTP_NM_GRIDDRAGDROP, XTP_NM_GRID_BEGINDRAG, XTP_NM_GRID_DROP, * XTP_NM_GRID_RECORDS_DROPPED, XTP_NM_GRID_DRAGDROP_COMPLETED */ # define XTP_NM_GRID_DRAGOVER (NM_FIRST - 81) /** * @brief * Defines the message for the column group order changed event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_GROUPORDERCHANGED notification message is sent to inform the * owner window that the user changed the columns group order of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_GROUPORDERCHANGED, XTP_ID_GRID_CONTROL, OnGridGroupOrderChanged)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridGroupOrderChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    XTP_NM_GRIDCOLUMNORDERCHANGED* pItemNotify = (XTP_NM_GRIDCOLUMNORDERCHANGED*)
 *    pNotifyStruct; _ASSERTE(pItemNotify != NULL);
 *
 *    // Handle command.
 * }
 * 
* @see * XTP_NM_GRID_CHECKED, XTP_NM_GRID_HEADER_RCLICK, * XTP_NM_GRID_HYPERLINK, XTP_NM_GRID_INPLACEBUTTONDOWN, XTP_NM_GRID_SELCHANGED, * XTP_NM_GRID_COLUMNORDERCHANGED, XTP_NM_GRID_SORTORDERCHANGED, XTP_NM_GRID_VALUECHANGED, * CXTPGridControl, CXTPGridHeader */ # define XTP_NM_GRID_GROUPORDERCHANGED (NM_FIRST - 82) /** * @brief * Defines the message for the item button click event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_ITEMBUTTONCLICK notification message is sent to inform the * owner window that the user clicked an item button of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * @return * TRUE if this message was processed, FALSE for default process. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_ITEMBUTTONCLICK, XTP_ID_GRID_CONTROL, OnGridItemButtonClick)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridItemButtonClick(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *		XTP_NM_GRIDITEMCONTROL* pItemNotify = (XTP_NM_GRIDITEMCONTROL*) pNotifyStruct;
 *		_ASSERTE(pItemNotify->pItemControl);
 *
 *		// Handle command.
 * }
 * 
* @see * XTP_NM_GRIDITEMCONTROL * CXTPGridRecordItemControl, CXTPGridRecordItemButton */ # define XTP_NM_GRID_ITEMBUTTONCLICK (NM_FIRST - 83) /** * @brief * Defines the message for the header column click on PlusMinus icon event. * @param id Resource ID for the control. * @param memberFxn Name of member function to handle the message. * @details * The XTP_NM_GRID_PLUSMINUSCLICK notification message is sent to inform the * owner window that the user clicked a header column PlusMinus icon * of the Grid control. * The owner window of the Grid control receives this notification through * the WM_COMMAND message. * @return * TRUE if this message was processed, FALSE for default process. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_PLUSMINUSCLICK, XTP_ID_GRID_CONTROL, OnGridPlusMinusClick)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridPlusMinusClick(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 *    XTP_NM_GRIDITEMCONTROL* pItemNotify = (XTP_NM_GRIDITEMCONTROL*) pNotifyStruct;
 *    _ASSERTE(pItemNotify->pItemControl);
 *    _ASSERTE(pItemNotify->pColumn);
 *    CPoint ptClick = pItemNotify->pt;
 *
 *    // Handle command.
 * }
 * 
*/ # define XTP_NM_GRID_PLUSMINUSCLICK (NM_FIRST - 84) /** * @brief * This message is sent by the Grid control when the state of an item * or range of items has changed. It is sent in the form of a WM_NOTIFY message. * @param lpStateChange Long pointer to an XTP_NM_GRIDSTATECHANGED structure that * contains data about the item or items that have changed. * @details * The XTP_NM_GRID_STATECHANGED notification message is sent to inform the * owner window that the state of an item or range of items has changed. * @return * The application receiving this message must return zero. * * Example: * Here is an example of how an application would handle this message. *
 * BEGIN_MESSAGE_MAP(CGridSampleView, CXTPGridView)
 * ON_NOTIFY(XTP_NM_GRID_STATECHANGED, XTP_ID_GRID_CONTROL, OnGridStateChanged)
 * END_MESSAGE_MAP()
 *
 * void CGridSampleView::OnGridStateChanged(NMHDR*  pNotifyStruct, LRESULT* result)
 * {
 * 		XTP_NM_GRIDSTATECHANGED* pItemNotify = (XTP_NM_GRIDSTATECHANGED*)pNotifyStruct;
 * 		int nBegin = nm.nBegin; // first item in the range
 * 		int nEnd = nm.nEnd; // last item in the range
 *
 * 		// Handle command.
 * }
 * 
*/ # define XTP_NM_GRID_STATECHANGED (NM_FIRST - 88) /** * @brief * The XTP_NM_GRID_HSCROLL message is sent when the horizontal * scrolling position has changed. */ # define XTP_NM_GRID_HSCROLL (NM_FIRST - 90) /** * @brief * The XTP_NM_GRID_VSCROLL message is sent when the vertical * scrolling position has changed. */ # define XTP_NM_GRID_VSCROLL (NM_FIRST - 91) /** * @brief * The XTP_NM_GRID_MOUSEMOVE message is sent when the * mouse is moved over the control. */ # define XTP_NM_GRID_MOUSEMOVE (NM_FIRST - 92) # define XTP_NM_GRID_GIVEFEEDBACK (NM_FIRST - 93) /** * @brief * The XTP_NM_GRID_ROWHEIGHTCHANGED notification message is sent * when the height of a row has changed. This can happen when the user * changes the height. */ # define XTP_NM_GRID_ROWHEIGHTCHANGED (NM_FIRST - 94) /** @cond */ # define XTP_NM_GRID_ROWHEIHGTCHANGED XTP_NM_GRID_ROWHEIGHTCHANGED /** @endcond */ /** * @brief * Enables deprecated Grid control methods. */ # define XTP_GRID_DEPRECATED() (1) class CXTPGridRow; /** * @brief * Defines a function pointer for comparing events. * @details * This function pointer is used in the SortEx method. * @see * Sort, SortEx, CXTPGridControl::SetRowsCompareFunc */ typedef int(AFX_CDECL* XTPGridRowsCompareFunc)(const CXTPGridRow** pRow1, const CXTPGridRow** pRow2); # define XTP_DECLARE_PROPERTY(property, type) \ afx_msg type OleGet##property(); \ afx_msg void OleSet##property(type); # define XTP_DISP_PROPERTY_EX_ID(theClass, szExternalName, dispid, vtPropType) \ DISP_PROPERTY_EX_ID(theClass, #szExternalName, dispid, OleGet##szExternalName, \ OleSet##szExternalName, vtPropType) # define XTP_IMPLEMENT_PROPERTY(theClass, theProperty, theMember, theType) \ theType theClass::OleGet##theProperty() \ { \ return theMember; \ } \ void theClass::OleSet##theProperty(theType set) \ { \ theMember = set; \ } # define XTP_IMPLEMENT_PROPERTY_COLOR(theClass, theProperty, theMember) \ COLORREF theClass::OleGet##theProperty() \ { \ return theMember; \ } \ void theClass::OleSet##theProperty(COLORREF oleColor) \ { \ theMember = AxTranslateColor(oleColor); \ } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPGRIDDEFINES_H__) /** @endcond */