BCGControlBar Pro for MFC
UINT BCGM_GRID_ITEM_BEGININPLACEEDIT

This registered windows message is sent to the grid's owner window by the default implementation of CBCGPGridCtrl::OnBeginInplaceEdit.

Parameters
wParamID of Grid Control that sent the message
lParama reference to BCGPGRID_ITEM_INFO structure, which describes the grid item to be edited.
Returns
an application should return zero if it processes this message.

In BCGPGRID_ITEM_INFO::dwResultCode the sender saves the combination of BeginEditFlags, which specify the reason why the in-place edit starts.

Sample code:

Copy
1 class CYourOwnerWnd
2 {
3 //...
4  afx_msg LRESULT OnBeginLabelEdit (WPARAM, LPARAM);
5 };
6 
7 BEGIN_MESSAGE_MAP(CYourOwnerWnd/*...*/)
8 //...
9  ON_REGISTERED_MESSAGE(BCGM BCGM_GRID_ITEM_BEGININPLACEEDIT, OnBeginLabelEdit)
10 END_MESSAGE_MAP()
11 
12 LRESULT CYourOwnerWnd::OnBeginLabelEdit (WPARAM wp, LPARAM lp)
13 {
14  int nCtrlId = (int)wp; // ID of the grid control
15 
16  BCGPGRID_ITEM_INFO* pii = (BCGPGRID_ITEM_INFO*)lp;
17  ASSERT(pii != NULL);
18 
19  CBCGPGridItem* pItem = pii->pItem; // Item
20  pii->nRow; // Row of an item
21  pii->nCol; // Column of an item
22  pii->dwResultCode; // Combination of BeginEditFlags
23 
24  // TODO Add your code here
25 
26  return 0;
27 }