3 ms·
quickest way to do it is to negate your if conditions in the loop something like this: if (ForegroundWindow) { ... } else {
by asddubs 11y ago
quickest way to do it is to negate your if conditions in the loop something like this:
if (ForegroundWindow)
{
...
}
else
{
MessageBox(NULL, L"Unable to detect foreground window!", L"UniversalPauseButton Error", MB_OK | MB_ICONERROR);
}
becomes
if (!ForegroundWindow)
{
MessageBox(NULL, L"Unable to detect foreground window!", L"UniversalPauseButton Error", MB_OK | MB_ICONERROR);
break;
}
...