我使用此代码列出进程:
//Creating ListBox
hPNList=CreateWindow(TEXT("ListBox"),TEXT(""),WS_CHILD|WS_VISIBLE|LBS_SORT|LBS_NOTIFY,30,132,185,380,hWnd,(HMENU)PNLIST_ID,
GetModuleHandle(NULL),NULL);
//changing Font
SendMessage( hPNList ,WM_SETFONT ,(WPARAM) GetStockObject(DEFAULT_GUI_FONT ),TRUE);
//making list
ProcessCount =getprocesslist(pro);
//adding to list
for ( i = 0; i < ProcessCount; i++)
{
int pos = (int)SendMessage(hPNList, LB_ADDSTRING, 0,
(LPARAM) pro[i].szExeFile);
// Set the array index of the player as item data.
// This enables us to retrieve the item from the array
// even after the items are sorted by the list box.
SendMessage(hPNList, LB_SETITEMDATA, pos, (LPARAM) pro[i].th32ProcessID );
}
现在我想以树的形式展示它。有人可以帮我怎么做吗?