我调用FlashWindow让窗口闪烁一次之后,窗口在任务栏上就一直显示为蓝色,点击调出窗口,它还是显示蓝色,不能恢复原状,怎么办?

解决方案 »

  1.   

    BOOL FlashWindow( BOOL bInvert );Return ValueNonzero if the window was active before the call to the FlashWindow member function; otherwise 0.ParametersbInvertSpecifies whether the CWnd is to be flashed or returned to its original state. The CWnd is flashed from one state to the other if bInvert is TRUE. If bInvert is FALSE, the window is returned to its original state (either active or inactive).
      

  2.   

    BOOL FlashWindow(
      HWND hWnd,     // handle to window
      BOOL bInvert   // flash status
    );
    hWnd:[in] Handle to the window to be flashed. The window can be either open or minimized. 
    bInvert:[in] Specifies whether the window is to be flashed or returned to its original state. The window is flashed from one state to the other if this parameter is TRUE. If it is FALSE, the window is returned to its original state (either active or inactive). When an application is minimized, if 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 redraw, but it does not provide the visual invert clue to the user.
      

  3.   

    ^o^ 你FlashWindow一次窗口在任务栏上就改变一次颜色,在FlashWindow回来这样
    for(n=0;n<=6;n++)
    {
    FlashWindow(n%2);
    Sleep(500);
    }
      

  4.   

    我在程序里直接调用两次FlashWindow,一次true,一次false,但是还是不行,
    其实也不是完全不行,有时候变蓝之后,我点击它就会恢复,但有时候却怎么点击它还是显蓝色,这似乎毫无道理啊!
      

  5.   

    我映射了WM_ACTIVATE消息,在里面调用FlashWindow(false),在对话框被激活时,确实可以恢复为灰色,但是只要对话框处于非激活状态,它就立刻变成蓝色了,这是为什么?