// This will haste your process, use when you need SPEEEED for algorithms etc..! // Get HWND process ID DWORD pID = 0; GetWindowThreadProcessId(hWnd, &pID); HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pID); SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS); // This is the highest possible priority! CloseHandle(hProcess);