MFC Grid manual

NM_GRIDCOLUMN Struct Reference

Sent by the grid to notify its parent window about column 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 that sends this notification.
CHeaderheader
 Grid header.
UINT state
 Combination of GUI::Notifications::ColumnState enumeration.
CColumncolumn
 The column where it is appropriate.

Detailed Description

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

Related events identifiers:

GUI::Notifications::AddColumn
GUI::Notifications::RemoveColumn
GUI::Notifications::MoveColumn
GUI::Notifications::ResizeColumn
GUI::Notifications::UpdateColumn

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

 Example:

 //File TestDlg.h

 class CTestDlg : public CDialog
 {
   ...

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

 private:
     GUI::CGrid m_Grid;

     DECLARE_MESSAGE_MAP()
 };


 //File TestDlg.cpp

 BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
     ...
     ON_NOTIFY(GUI::Notifications::AddColumn, IDC_GRID, OnAddColumn)
     ...
 END_MESSAGE_MAP()


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