Home > Software engineering >  MFC generated message mapping table, the name of the class with & what meaning be?
MFC generated message mapping table, the name of the class with & what meaning be?

Time:09-24

BEGIN_MESSAGE_MAP (CDemoFileIODlg CDialogEx)
ON_WM_SYSCOMMAND ()
ON_WM_PAINT ()
ON_WM_QUERYDRAGICON ()
ON_BN_CLICKED (IDC_BUTTON_BRWS, & amp; CDemoFileIODlg: : OnBnClickedButtonBrws)
ON_BN_CLICKED (IDC_BUTTON_SAVE, & amp; CDemoFileIODlg: : OnBnClickedButtonSave)
ON_BN_CLICKED (IDC_BUTTON_LOAD, & amp; CDemoFileIODlg: : OnBnClickedButtonLoad)
END_MESSAGE_MAP ()


MFC generated message mapping table, the name of the class with & amp; What do you mean?
Such as: ON_BN_CLICKED (IDC_BUTTON_BRWS, & amp; CDemoFileIODlg: : OnBnClickedButtonBrws)

Delete the symbol & amp; Became: ON_BN_CLICKED (IDC_BUTTON_BRWS CDemoFileIODlg: : OnBnClickedButtonBrws)
Also won't complain,

CodePudding user response:

Not in front of the class name to add & amp; , it should be this & amp; Before the function name, function addresses, equivalent to a pointer, & amp; Is the address-of operator, function, not class

CodePudding user response:

Vc version would be ON_BN_CLICKED (IDC_BUTTON_BRWS, & amp; CDemoFileIODlg: : OnBnClickedButtonBrws)
Vc6 is ON_BN_CLICKED (IDC_BUTTON_BRWS OnBnClickedButtonBrws)

CodePudding user response:

& Take the address ~ ~ ~ ~

CodePudding user response:

A search for "direct call a class member function address." "

CodePudding user response:

& Take the address symbols

CodePudding user response:

(CDemoFileIODlg: : OnBnClickedButtonBrws)

CodePudding user response:

& CDemoFileIODlg: : OnBnClickedButtonLoad function address, for the function, add do not add & amp; The same, is a function address
  • Related