c++ MFC and handling windows Messages

838 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 answers

2
ScottMcP-MVP 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);