SetLayeredWindowAttributes not working on Windows 7

前端 未结 1 918
清歌不尽
清歌不尽 2021-01-06 14:35

I am using SetLayeredWindowAttributer to make a particular color of layered window transparent.

This works fine on Windows XP,VISTA . But when I use the same on Wi

相关标签:
1条回答
  • 2021-01-06 14:58

    You should avoid using 0xff,0xff,0xff (white) with LWA_COLORKEY. Any other value should be fine (e.g. 0xff,0xff,0xfe).

    For more control over your layered window I suggest you consider using UpdateLayeredWindowIndirect. I wrote an article that describes in detail how it can be used with both GDI and Direct2D.

    http://msdn.microsoft.com/en-us/magazine/ee819134.aspx

    0 讨论(0)
提交回复
热议问题