Win32: How to make drop shadow honor non-rectangular Layered window?

后端 未结 3 1640
北海茫月
北海茫月 2020-12-14 18:41

i\'ve created a layered window by adding the the WS_EX_LAYERED extended style:

wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED;

Windows

3条回答
  •  孤城傲影
    2020-12-14 19:23

    CS_DROPSHADOW only works with standard rectangular windows. WS_EX_LAYERED windows don't support everything. They are more of a low-level, self-service method to draw exactly what you want.

    To get a drop shadow, you'll have to generate the drop-shadow yourself from the alpha channel in the image.

提交回复
热议问题