The error C2440: "static_cast" : from "int (__thiscall CBPDlg: : *) (void)" into "AFX_PMSG 1 & gt;" From the base type to a derived type coercion dynamic_cast or static_cast
To solve the
CodePudding user response:
If it is a reflection of message, can try ON_CONTROL_REFLECT_EXThe parent class try reloading OnCommand processing directly
CodePudding user response:
The processing function of a button, return void itself, you return a BOOL is for who? The building Lord meaning in where?CodePudding user response:
Encapsulates a BOOL type function and type a Boolean variable,BOOL type functions on click inside the void, the return value to the BOOL type variable,
Then take the BOOL variables involved in operation,
As he puts upstairs a BOOL button function is no need to return a BOOL value,
CodePudding user response:
You should not modify the return value, but by the data in a different wayCodePudding user response:
To help the topEvent the return value is a specific meaning
CodePudding user response:
Add a BOOL m_bVar;Back in the variable,