Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Xtreme toolkit & vs2005
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Xtreme toolkit & vs2005

 Post Reply Post Reply
Author
Message
rt15051966 View Drop Down
Newbie
Newbie


Joined: 27 May 2005
Location: Poland
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote rt15051966 Quote  Post ReplyReply Direct Link To This Post Topic: Xtreme toolkit & vs2005
    Posted: 27 May 2005 at 12:47pm

how to compile library ver 9.60 with VS2005

there are many error with makro ON_WM_NCHITTEST()

return parameter in new MFC80 is incorect

example:

XTSplitterWnd.cpp

d:\tools\codejock software\mfc\xtreme toolkit pro v9.60\src\controls\common.src\xtsplitterwnd.cpp(91) : error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CXTSplitterWnd::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)'

Cast from base to derived requires dynamic_cast or static_cast

 

Back to Top
Sven View Drop Down
Senior Member
Senior Member


Joined: 21 August 2003
Location: Germany
Status: Offline
Points: 127
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sven Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2005 at 9:34am

MS changed the return value for ON_WM_NCHITTEST from UINT to LRESULT, you you have to change your source code too. For 64bit apps this is important because LRESULT is a 64bit value in the x64 world while UINT stays 32bit.

To get compatibility with MFC7 and below I added the following lines in stdafx.h after including the MFC headers:


#if _MFC_VER < 0x0800
#undef ON_WM_NCHITTEST

#define ON_WM_NCHITTEST() \
 { WM_NCHITTEST, 0, 0, 0, AfxSig_u_v_p, \
  (AFX_PMSG)(AFX_PMSGW) \
  (static_cast< LRESULT (AFX_MSG_CALL CWnd::*)(CPoint) > (OnNcHitTest)) },
#endif

So my code compiles fine both with VC6 (customized version of MFC7) and VS2005.



Edited by Sven
Back to Top
rt15051966 View Drop Down
Newbie
Newbie


Joined: 27 May 2005
Location: Poland
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote rt15051966 Quote  Post ReplyReply Direct Link To This Post Posted: 28 May 2005 at 12:24pm
thanks for answer
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.