在对话框中类中添加对CListCtrl控件右键处理的时候出现如下错误:
error C2440: 'reinterpret_cast' : cannot convert from 'NMHDR *' to 'NMITEMACTIVATE'
Conversion requires a constructor or user-defined-conversion operator, which can't be used by const_cast or reinterpret_cast
需要把:
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast(pNMHDR);
改为:
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast(pNMHDR);
参考:
阅读(1654) | 评论(0) | 转发(0) |