Unfortunately, there is no way to do this. The flashing state is temporary, and windows won't store this information except internally, temporarily, as needed by the animation itself. I used Resharper C++ to search for usages of the FLASHWINFO
struct and it's corresponding pointer type PFLASHWINFO
. The only instance of this structure being used is in the FlashWindowEx
method itself. There simply is no (public) API for querying this info.
You may be able to build something by hooking FlashWindowEx
, but it's likely to be a little difficult to get right. Assuming for the moment that you can hook FlashWindowEx
, you then have to calculate the exact amount of time the flash operation will take and then wipe out your program's state when that time has elapsed. If you'd like to try this approach, see this answer.