Skip to content

Commit

Permalink
Whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejPetrzilka committed Mar 22, 2020
1 parent 3d7a97b commit 4a7b470
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions RBTray.cpp
Expand Up @@ -292,9 +292,9 @@ LRESULT CALLBACK HookWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
RestoreWindowFromTray(_hwndItems[i]);
}
}
if (_hLib) {
UnRegisterHook();
FreeLibrary(_hLib);
if (_hLib) {
UnRegisterHook();
FreeLibrary(_hLib);
}
PostQuitMessage(0);
break;
Expand Down Expand Up @@ -323,7 +323,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance*
if (!wcscmp(argv[a], L"--exit")) {
shouldExit = true;
}
if (!wcscmp(argv[a], L"--no-hook")) {
if (!wcscmp(argv[a], L"--no-hook")) {
useHook = false;
}
}
Expand All @@ -338,16 +338,16 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance*
return 0;
}

if (useHook) {
if (!(_hLib = LoadLibrary(L"RBHook.dll"))) {
MessageBox(NULL, L"Error loading RBHook.dll.", L"RBTray", MB_OK | MB_ICONERROR);
return 0;
}
if (!RegisterHook(_hLib)) {
MessageBox(NULL, L"Error setting hook procedure.", L"RBTray", MB_OK | MB_ICONERROR);
return 0;
}
}
if (useHook) {
if (!(_hLib = LoadLibrary(L"RBHook.dll"))) {
MessageBox(NULL, L"Error loading RBHook.dll.", L"RBTray", MB_OK | MB_ICONERROR);
return 0;
}
if (!RegisterHook(_hLib)) {
MessageBox(NULL, L"Error setting hook procedure.", L"RBTray", MB_OK | MB_ICONERROR);
return 0;
}
}

WNDCLASS wc;
wc.style = 0;
Expand Down

0 comments on commit 4a7b470

Please sign in to comment.