本文介绍了错误C2440:'static_cast':无法从'BOOL(__thiscall CExListCtrl :: *)(WPARAM,LPARAM,LRESULT *)'转换为'void(__thiscall CCmdTarget :: *)(NMHDR *,LRESULT *)'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的兄弟,
我正在将vc6项目转换为Visual Studio 2005的vc8,我收到了这个错误。请建议一个摆脱这个的解决方案。
有一个功能如下
Dear bros,
I am converting a vc6 project to vc8 that is visual studio 2005 and I am getting this error. Please suggest a solution to get rid of this.
There is a funtion as following
BOOL CExListCtrl::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
HD_NOTIFY *pHDN = (HD_NOTIFY*)lParam;
if((pHDN->hdr.code == HDN_BEGINTRACKW || pHDN->hdr.code == HDN_BEGINTRACKA || pHDN->hdr.code == HDN_DIVIDERDBLCLICKA || pHDN->hdr.code == HDN_DIVIDERDBLCLICKW )
&& pHDN->iItem == 5) // Prevent only first (col# 0) from resizing
{
*pResult = TRUE; // disable tracking
return TRUE; // Processed message
}
return CListCtrl::OnNotify(wParam, lParam, pResult);
}
这是由编译器在通过时捕获的
this is caught by compiler when is passed through
ON_NOTIFY_REFLECT(WM_NOTIFY, OnNotify )macro funtion.
所以请建议我如何完成它。
感谢你
saffiuddin
So please suggest me how to get it done.
Thanking You
saffiuddin
推荐答案
这篇关于错误C2440:'static_cast':无法从'BOOL(__thiscall CExListCtrl :: *)(WPARAM,LPARAM,LRESULT *)'转换为'void(__thiscall CCmdTarget :: *)(NMHDR *,LRESULT *)'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!