Skip to content

Commit

Permalink
Fix CreateFlashWindow to register class only once
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Feb 2, 2024
1 parent d708334 commit effba37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FlashWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ HWND CreateFlashWindow(HWND hwndToCover)

if (!fInitializedWindowClass)
{
WNDCLASSEX wc = { 0 };
WNDCLASSEX wc = { sizeof(wc) };

wc.cbSize = sizeof(wc);
wc.style = 0;
wc.lpszClassName = WC_FLASHWINDOW;
wc.lpfnWndProc = FlashWndProc;

RegisterClassEx(&wc);

fInitializedWindowClass = TRUE;
}

GetWindowRect(hwndToCover, &rc);
Expand Down

0 comments on commit effba37

Please sign in to comment.