//初始化,list control 要为report风格
void Dlg_InitDialog6(HWND hwnd) {
//先创建七列
PCWSTR headText[7] = { L"名称",L"PID",L"状态",L"用户名",L"CPU",L"内存(活动的专用工作集)",L"UAC虚拟化" };
//list control句柄
HWND hwndList6 = GetDlgItem(hwnd, IDC_LIST6);
//开始插入列
LVCOLUMN lvCol = { 0 };
lvCol.mask =LVCF_WIDTH|LVCF_TEXT;
for (size_t i = 0; i < 7; i++)
{
if(i==0 ||i==3||i==5)
lvCol.cx = 110;
else
lvCol.cx = 60;
//列标题
lvCol.pszText = const_cast<PWSTR>(headText[i]);
//插入
ListView_InsertColumn(hwndList6, i, &lvCol);
}
;
//使单击list control,每次选中一行
SendMessage(hwndList6, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
ShowProcess(hwndList6, FunShow);
}
//插入行
void InsertListView(HWND hwndList, PTAB6