![]() |
CXTPOffice2007FrameHook and ON_MESSAGE |
Post Reply ![]() |
Author | |
ABuenger ![]() Newbie ![]() ![]() Joined: 02 February 2006 Status: Offline Points: 1075 |
![]() ![]() ![]() ![]() ![]() Posted: 04 February 2007 at 1:01pm |
If you derive the CMainFrame from CXTPMDIFrameWnd and CXTPOffice2007FrameHook the ON_MESSAGE macro doesn't work any longer.
error C2440: 'type cast' : cannot convert from 'void (__thiscall CMainFrame::*)(unsigned int,long)' to 'long (__thiscall CWnd::*)(unsigned int,long)' As a workaround I've made my own macro, maybe you can come up with a better solution? #define XTP_ON_MESSAGE(message, className, memberFxn) \ { message, 0, 0, 0, AfxSig_lwl, \ (AFX_PMSG)(void (className::*)(void))(LRESULT (AFX_MSG_CALL className::*)(WPARAM, LPARAM))&memberFxn }, |
|
Codejock support
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Looks like right error for me.
Instead "void" you have return "LRESULT"...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ABuenger ![]() Newbie ![]() ![]() Joined: 02 February 2006 Status: Offline Points: 1075 |
![]() ![]() ![]() ![]() ![]() |
Dang, you're right, ON_MESSAGE handlers should return a LRESULT.
It's so obvious that I haven't stumbled about that ![]() |
|
Codejock support
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |