Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
3.67/5 (3 votes)
See more:
I can't understand the following error,although I change defined from void to lresult,it's going wrong again.. if i can used Long to instead? Or any other way?
Thanks a lot!

《《error C2440: “static_cast”: Can not from“void (__thiscall CIPTVServerView::* )(WPARAM,LPARAM)”change to“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”》》
Posted
Comments
Sergey Alexandrovich Kryukov 11-Jul-12 12:11pm    
Well, this is not very nice. You should do some homework before asking the question. You should try to create a possibly minimal code sample to reproduce this message and post it in your question. Some can guess what it was, but why? Why looking at the error message not having the code which caused that message? After all, you are the one who is the most interested in a correct answer.
--SA
Richard MacCutchan 11-Jul-12 12:31pm    
Why not: 1. learn to use copy and paste properly,
2. show the line of code that causes the error,
3. use <pre> tags around code lines

Besides, with the different return types, your cast cannot work as the stack could get messed up.

See this link for similar problem and solution.
http://social.msdn.microsoft.com/Forums/eu/vcmfcatl/thread/208499e4-0c09-4835-ad80-313121eb75d5[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900