Hey guys,

From my understanding when your closing a window from Task Manager, it sends a WM_CLOSE or WM_QUIT (not sure). So I used : SendMessageA(hWin,WM_CLOSE,0,0); and it worked, but unfortunately it didn't work on my other window. It works when I close it from Task Manager but not from sending a SendMessage. So can anyone tell me the way that task manager closes windows and help me out with the coding thanks.