BCGSuite for MFC
BCGCBPRODLLEXPORT UINT BCGM_GRID_BEGINDRAG

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

Parameters
wParamID of the grid control
lParamspecifies the x- and y-coordinate of the cursor.
Returns
TRUE, if the grid starts Drag-and-Drop. If message is not handled, the default implementation does not start Drag-and-Drop.

Sample code:

Copy
1 class CYourOwnerWnd
2 {
3 //...
4  afx_msg LRESULT OnNotifyBeginDrag(WPARAM, LPARAM);
5  DECLARE_MESSAGE_MAP()
6 };
7 
8 BEGIN_MESSAGE_MAP(CYourOwnerWnd /*...*/)
9 //...
10  ON_REGISTERED_MESSAGE(BCGM_GRID_BEGINDRAG , OnNotifyBeginDrag)
11 END_MESSAGE_MAP()
12 
13 LRESULT CYourOwnerWnd::OnNotifyBeginDrag(WPARAM wp, LPARAM lp)
14 {
15  int nCtrlId = (int)wp; // ID of the grid control
16 
17  CPoint point; // Mouse coordinates
18  POINTSTOPOINT (point, lParam); //
19 
20  // TODO Add your code here
21 
22  return TRUE; // to start Drag-and-Drop
23 }