Вопрос

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