MFC Grid manual

NM_GRIDEDIT Struct Reference

Sent by the grid to notify its parent window about edit in place processing. 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.
HITEM item
 Handle in the grid.
Common::CDataObjectpDO
 The data object, associated with a handle.
ContextType context
 The grid context to which a handle is related.
int row
 Index of a line in the context.
CColumncolumn
 A column.
CWnd * control
 Edit in place control if it exists.
IEditInPlace::StartReason startReason
 Edit in place start reason.
IEditInPlace::StopReason stopReason
 Edit in place stop reason.

Detailed Description

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

Related events identifiers:

GUI::Notifications::BeginEdit
GUI::Notifications::EndEdit

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

 Example:

 //File TestDlg.h

 class CTestDlg : public CDialog
 {
   ...

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

 private:
     GUI::CGrid m_Grid;

     DECLARE_MESSAGE_MAP()
 };


 //File TestDlg.cpp

 BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
     ...
     ON_NOTIFY(GUI::Notifications::BeginEdit, IDC_GRID, OnBeginEdit)
     ...
 END_MESSAGE_MAP()


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