c++ MFC and handling windows Messages

851 Views Asked by At

What code is needed in the message map for Windows messages?

The code calling the function:

SendMessage(GRID_WM_UPDATECELL,(WPARAM)1,(LPARAM)&sDisp);

The function:

LRESULT CNJAGridCtrl::OnUpdateCell(WPARAM wParam, LPARAM lParam)
{
}
1

There are 1 best solutions below

2
On BEST ANSWER

The message map line should be

ON_MESSAGE(GRID_WM_UPDATECELL, OnUpdateCell) 

and the function signature should be

LRESULT CNJAGridCtrl::OnUpdateCell(WPARAM wParam, LPARAM lParam);