سؤال

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