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

后端 未结 3 1644
北海茫月
北海茫月 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:13

    Transparent layered windows is documented as the preferred technique over regions.

    However, CS_DROPSHADOW does pay attention to regions. If you crop or otherwise shape your window using a region, the drop-shadow will follow the new outline.

    Fortunately, you can use regions with layered windows, and by combining the two get the effect you're looking for.

    BTW: tooltips_class32 does use CS_DROPSHADOW - you won't see it in the window styles because it's a class style, not a window style.

提交回复
热议问题