I Want To Fade-in, Fade-out a particular region created by me. but when i use animatewindow() It fades out entire window which is not visible earlier when i created polygon region. how do i do this? help can be appreciated.

有帮助吗?

解决方案

Try this: Use the SetLayeredWindowAttributes like this :

for (int opacity = 0; opacity <= 255; opacity++)
{
  ::SetLayeredWindowAttributes(hWnd, RGB(0,0,0), opacity, LWA_ALPHA);
  Sleep(20) ;
}

This will fade out the hWnd window in approximately 5 seconds. The hWnd window must be created with the WS_EX_LAYERED extended style.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top