// List all process to specific list view
void ListProcesses()
{
HWND hList = GetDlgItem( g_hDlg, IDC_LISTPROCESSES );
ListView_DeleteAllItems( hList );
// Kill process witch user spicificed in process list
void OnKill()
{
HWND hList = GetDlgItem( g_hDlg, IDC_LISTPROCESSES );
int nItemCount = ListView_GetItemCount( hList );
for ( int i = 0; i < nItemCount; i++ )
{
UINT uState = ListView_GetItemState( hList, i, LVIS_SELECTED );
if ( LVIS_SELECTED == uState )
{
char szId[256];
ListView_GetItemText( hList, i, 1, szId, sizeof(szId) );