2012-07-03 40 views
0

我用這個代碼列出的過程:使用c的對象樹?

 //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); 
     } 

現在我想表明,在一棵樹style.Can人幫助我該怎麼辦呢?

+0

@HighPerformanceMark:我想以樹狀風格顯示windows進程。 – Mehrdad

+0

@HighPerformanceMark:編輯的問題。 – Mehrdad

回答