15,980
社区成员




LVCOLUMN col;
ZeroMemory(&col,sizeof(col));
char *txt=new char[64];
col.mask = LVCF_TEXT;
col.pszText=txt;
col.cchTextMax=64;
if(ListView_GetColumn(hwnd,0,&col))
{
printf("%s\r\n",col.pszText);//这里获取不到东西,txt如果设置为一串a,返回依旧是一串a
}
LVCOLUMN col;
ZeroMemory(&col,sizeof(col));
char *txt=new char[64];
col.mask = LVCF_TEXT|LVCF_SUBITEM;
col.pszText=txt;
col.cchTextMax=64;
col.iSubItem=0;
if(ListView_GetColumn(hwnd,0,&col))
{
printf("%s\r\n",col.pszText);
}
vc6获取不到,vs2010把目标程序崩溃掉,错误信息是
MainForm.exe 中的 0x73f5fa8d (comctl32.dll) 处有未经处理的异常: 0xC0000005: 读取位置 0x0024f950 时发生访问冲突