Peter Ward d3bc89592f - Added a small utility (chknewer) to check if one file is newer than another.
- This removes the dependency on test from Config.cmd and Build.cmd.
- Some other miscellaneous cleanup.

svn path=/trunk/tools/RosBE-Windows/; revision=442
2007-10-24 07:04:52 +00:00

57 lines
1.1 KiB
C

/*
* PROJECT: RosBE - ReactOS Build Environment for Windows.
* LICENSE: GPL - See LICENSE.txt in the top level directory.
* FILE: Tools/flash.c
* PURPOSE: Taskbar Flasher
* COPYRIGHT: Copyright 2007 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;
}