Example
The following example shows the sheet number in a message box.
C++
afx_msg LONG OnSheetChanged(UINT wParam, LONG lParam);
ON_MESSAGE(SSM_SHEETCHANGED, OnSheetChanged)
afx_msg LONG CMfcSpread7Dlg::OnSheetChanged(UINT wParam, LONG lParam)
{
short o, n;
o = LOWORD(lParam);
n = HIWORD(lParam);
char buf[10];
itoa(n,(LPSTR)buf, 10);
AfxMessageBox(buf);
return 0;
}