From 417551a1328bce6004ed5f176ec9f402194b3ebd Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Mon, 9 Oct 2023 14:09:52 -0500 Subject: [PATCH] Alert user during incoming connection --- WinChat/src/Application.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WinChat/src/Application.cpp b/WinChat/src/Application.cpp index d3e76d4..8014433 100644 --- a/WinChat/src/Application.cpp +++ b/WinChat/src/Application.cpp @@ -291,6 +291,11 @@ namespace wc { SetDlgItemText(dlg, IDC_STATICREMOTEINFO, app->m_inAddress.c_str()); SendDlgItemMessage(dlg, IDC_EDITSCREENNAME, EM_SETCUEBANNER, TRUE, reinterpret_cast(L"User")); + //Get the attention of the user + FLASHWINFO fw = { .cbSize = sizeof(fw), .hwnd = GetParent(dlg), .dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG }; + FlashWindowEx(&fw); + MessageBeep(MB_OK); + return TRUE; }