Home > Software engineering >  Questions about MFC add menu event handler
Questions about MFC add menu event handler

Time:09-17


How do I solve?

CodePudding user response:

Corresponding response function can't ON_COMMAND parameter
Afx_msg void On32774 ();


CodePudding user response:

Vc6 is
# define ON_COMMAND (id, memberFxn) \
{WM_COMMAND, CN_COMMAND, (WORD) id, id (WORD), AfxSig_vv, (AFX_PMSG) & amp; MemberFxn},
//ON_COMMAND (id, OnFoo) is the same as
//ON_CONTROL (0, id, OnFoo) or ON_BN_CLICKED (0, id, OnFoo)

No static_cast
  • Related