4 out of 5 rated this helpful Rate this topic

FlashWindow function

Flashes the specified window one time. It does not change the active state of the window.

To flash the window a specified number of times, use the FlashWindowEx function.

Syntax

BOOL WINAPI FlashWindow(
  __in  HWND hWnd,
  __in  BOOL bInvert
);

Parameters

hWnd [in]

A handle to the window to be flashed. The window can be either open or minimized.

bInvert [in]

If this parameter is TRUE, the window is flashed from one state to the other. If it is FALSE, the window is returned to its original state (either active or inactive).

When an application is minimized and this parameter is TRUE, the taskbar window button flashes active/inactive. If it is FALSE, the taskbar window button flashes inactive, meaning that it does not change colors. It flashes, as if it were being redrawn, but it does not provide the visual invert clue to the user.

Return value

The return value specifies the window's state before the call to the FlashWindow function. If the window caption was drawn as active before the call, the return value is nonzero. Otherwise, the return value is zero.

Remarks

Flashing a window means changing the appearance of its caption bar as if the window were changing from inactive to active status, or vice versa. (An inactive caption bar changes to an active caption bar; an active caption bar changes to an inactive caption bar.)

Typically, a window is flashed to inform the user that the window requires attention but that it does not currently have the keyboard focus.

The FlashWindow function flashes the window only once; for repeated flashing, the application should create a system timer.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Error Handling Functions
Notifying the User

 

 

Send comments about this topic to Microsoft

Build date: 9/11/2011

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Etiquette of Notifications
It's important to check Microsoft's etiquette of notifications at: http://msdn.microsoft.com/en-us/library/aa511497.aspx
hgfrt
ufuhjkuhuiyuyui