Error while compiling
-
error C2440: 'static_cast' : cannot convert from 'void (__thiscall COptionDBTransport::* )(PCTSTR)' to 'AFX_PMSG'
Throws error at this line-
ON_BN_CLICKED(IDC_BUTTON_udpCheck, &COptionDBTransport::OnBnClickedButtonudpcheck)
Please help me for this issue.
-
error C2440: 'static_cast' : cannot convert from 'void (__thiscall COptionDBTransport::* )(PCTSTR)' to 'AFX_PMSG'
Throws error at this line-
ON_BN_CLICKED(IDC_BUTTON_udpCheck, &COptionDBTransport::OnBnClickedButtonudpcheck)
Please help me for this issue.
-
error C2440: 'static_cast' : cannot convert from 'void (__thiscall COptionDBTransport::* )(PCTSTR)' to 'AFX_PMSG'
Throws error at this line-
ON_BN_CLICKED(IDC_BUTTON_udpCheck, &COptionDBTransport::OnBnClickedButtonudpcheck)
Please help me for this issue.
Does your COptionDBTransport inherit from CCmdTarget (or a derived type of it)? Have you included (even if indirectly) ? (ON_BN_CLICKED is defined in another header)
-
Does your COptionDBTransport inherit from CCmdTarget (or a derived type of it)? Have you included (even if indirectly) ? (ON_BN_CLICKED is defined in another header)
Thanks, Yes Have inculded the header file.
-
Yes ,it is inherited from CCmdTarget(base class of all classes used) M still stuck to that error @pasztorpisti-How to pass multiple parameters to a button event handler.
-
Yes ,it is inherited from CCmdTarget(base class of all classes used) M still stuck to that error @pasztorpisti-How to pass multiple parameters to a button event handler.
You can not pass a parameter to a button event handler. You have to gather the data in the handler - for example by querying textboxes/checkboxes/etc in your handler method.
-
You can not pass a parameter to a button event handler. You have to gather the data in the handler - for example by querying textboxes/checkboxes/etc in your handler method.
thanks pasztorpisti, will try that.
-
Thanks, Yes Have inculded the header file.
Then I'm totally baffled. Recommend you compile with /P (preprocess to file) and then, from a command-prompt try to compile that generated file. It should contain #line directives and such making it (hopefully) obvious why it fails. ++luck;