EVC中CListCtrl初始化问题
大家帮忙看下,这是我的初始化语句,在VC中没有问题,但在evc中不行,请指教,急用谢谢~~
m_List1.DeleteColumn(0);
m_List1.InsertColumn(0,"Index",LVCFMT_CENTER,80);
m_List1.DeleteColumn(1);
m_List1.InsertColumn(1,"Type",LVCFMT_CENTER,80);
m_List1.DeleteColumn(2);
m_List1.InsertColumn(2,"Time",LVCFMT_CENTER,100);
错误的原因是:'int __thiscall CListCtrl::InsertColumn(int,const unsigned short *,int,int,int)' : cannot convert parameter 2 from 'char [6]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
[解决办法]
evc中是unicode编译的吧,第二个参数需要宽字符的串,用宏来转换吧
vc中用_T() _TEXT()宏可以,evc不清楚,你查查吧