After you re-do everything, call UpdateWindow (on the list hwnd) to refresh the list. Also with your current code, if any new processes are detected, your mark will be thrown off as well. I guess the best solution would be also to store the process's name and do a double check