When member function whose return type is int is placed inside the ON_COMMAND of BEGIN_MESSAGE_MAP, It shows error of invalid type conversion. Suggest whats the alternative for that or how can i pass int return function .

// MyFrame.h
Code:
afx_msg int func();
//MyFrame.cpp
Code:
BEGIN_MESSAGE_MAP (MyFrame, CFrameWnd)
ON_COMMAND (ID1,func)
END_MESSAGE_MAP()