MFC Grid manual

NM_GRIDSORT Struct Reference

Sent by the grid to notify its parent window about sorting changing. This notification is sent in form of WM_NOTIFY message. More...

#include <Dapfor/GUI/Notifications.h>

List of all members.


Public Attributes

NMHDR hdr
 NMHDR structure that contains information about this notification message.
Notifications::NotificationType type
 Notification type.
CGridgrid
 The grid which sent this notification.
CHeaderheader
 Grid header.

Detailed Description

Sent by the grid to notify its parent window about sorting changing. This notification is sent in form of WM_NOTIFY message.

Related events identifiers:

GUI::Notifications::SortChanged

GUI::NM_GRIDSORT* lpNotif = (GUI::NM_GRIDSORT*) lParam;

 Example:

 //File TestDlg.h

 class CTestDlg : public CDialog
 {
   ...

 protected:
     afx_msg void OnSortChanged(NMHDR* pNMHDR, LRESULT* pResult);

 private:
     GUI::CGrid m_Grid;

     DECLARE_MESSAGE_MAP()
 };


 //File TestDlg.cpp

 BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
     ...
     ON_NOTIFY(GUI::Notifications::SortChanged, IDC_GRID, OnSortChanged)
     ...
 END_MESSAGE_MAP()


 void CTestDlg::OnSortChanged(NMHDR* pNMHDR, LRESULT* pResult)
 {
     GUI::NM_GRIDSORT* pItem = (GUI::NM_GRIDSORT*)pNMHDR;
     
     //To do something...
 
     *pResult = 0;
 }