RosBE/RosBE-Windows/Tools/flash.c
Daniel Reimer 5c651a0491 Preparation for RosBE 2.1.6 for Windows (#1)
- HTTP -> HTTPS in updater script
- Fix Updater script by granting access rights for it. ROSBE-129
- Remove sSVN and it's SVN binaries being useless now.
- Update changelog showing the binary updates.
- Update Copyright header year -> 2018
- 2.1.5 -> 2.1.6
2018-01-28 20:08:38 +01:00

57 lines
1.1 KiB
C

/*
* PROJECT: RosBE - ReactOS Build Environment for Windows.
* LICENSE: GNU General Public License v2. (see LICENSE.txt)
* FILE: Tools/flash.c
* PURPOSE: Taskbar Flasher
* COPYRIGHT: Copyright 2018 Ged Murphy <gedmurphy@reactos.org>
*
*/
#include <windows.h>
HWND GetConsoleHwnd(void)
{
WCHAR szNewTitle[MAX_PATH];
WCHAR szOldTitle[MAX_PATH];
HWND hwnd = NULL;
if (GetConsoleTitleW(szOldTitle, MAX_PATH))
{
wsprintfW(szNewTitle,
L"%d/%d",
GetTickCount(),
GetCurrentProcessId());
if (SetConsoleTitleW(szNewTitle))
{
Sleep(40);
hwnd = FindWindowW(NULL, szNewTitle);
SetConsoleTitleW(szOldTitle);
}
}
return hwnd;
}
int main()
{
HWND hwnd;
FLASHWINFO fwi = {0,};
hwnd = GetConsoleHwnd();
if (hwnd)
{
fwi.cbSize = sizeof(FLASHWINFO);
fwi.hwnd = hwnd;
fwi.dwFlags = FLASHW_TRAY | FLASHW_TIMERNOFG;
fwi.uCount = 1;
FlashWindowEx(&fwi);
}
return 0;
}