FlashWindowEx, WinNT and C++Builder 1


2004-09-23 01:54:28 AM
cppbuilder114
Hi..
until now, I was using the code showed below on my application.
It worked ok on Win 98, XP , etc.. and C++Builder 6.
Now, I'm trying to use it on Windows NT in an application developed
with C++Builder 1. Trying to compile, I get the following error:
"Undefined symbol PFLASHWINFO"
"Undefined symbol FLASHWINFO"
What can I do (or what i'm forgetting) to make this work?
Thanks a lot (and excuse me for my poor english).
//It loads the function address at runtime instead of relying on the
program
//loader to load it.
BOOL (WINAPI *FlashWindowExPtr)(PFLASHWINFO);
HINSTANCE user32_hinst = GetModuleHandle("USER32.DLL");
(FARPROC) FlashWindowExPtr =
GetProcAddress(user32_hinst, "FlashWindowEx");
if ((user32_hinst != NULL) && (FlashWindowExPtr != NULL))
{
FLASHWINFO info = {sizeof(FLASHWINFO), 0};
info.hwnd = Application->Handle;
if(flash) //Iniciamos el parpadeo
info.dwFlags = FLASHW_CAPTION | FLASHW_TRAY | FLASHW_TIMER;
else //Lo paramos
info.dwFlags = FLASHW_STOP;
// info.dwFlags = FLASHW_ALL | FLASHW_TIMERNOFG;
//FLASHW_ALL =>Parpadea la ventana y el icono de la barra de
tareas
//FLASHW_TIMERNOFG =>Parpadea continuam. hasta que la ventana
pasa a 1er plano
info.uCount = 100; //Numero de veces que parpadea la ventana
FlashWindowExPtr(&info);
}
else
{
FlashWindow(Application->Handle, true);
}