win32下ListControl的使用
LVCOLUMN listCol;
switch(umsg)
{
case WM_INITDIALOG:
{
hTableList = GetDlgItem(hwnd,IDC_LISTDATA);
memset(&listCol, 0, sizeof(LVCOLUMN));
listCol.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM;
listCol.pszText = "文件名称";
listCol.cx = 0x110;
SendMessage(hTableList,LVM_INSERTCOLUMN,0,(LPARAM)&listCol); // Insert/Show the coloum
listCol.pszText = "修改日期";
listCol.cx = 0x90;
SendMessage(hTableList,LVM_INSERTCOLUMN,1,(LPARAM)&listCol); // Insert/Show the coloum
listCol.pszText = "文件大小";
listCol.cx = 0x53;
SendMessage(hTableList,LVM_INSERTCOLUMN,2,(LPARAM)&listCol); // Insert/Show the coloum
CenterDlgInParent(hwnd);
break;
}
我还是只小菜鸟。所以大家不要笑话哈!
浙公网安备 33010602011771号