ws-ex-layered

Win32: How to draw outside my window?

馋奶兔 提交于 2019-12-09 01:00:02
问题 Looking at a Windows tooltips class hint window, i see that it draws its drop-shadow outside the hint window's actual rectangle. Using SpyXX - i can get the tooltip's window rect, and class styles: Rectangle: (440, 229)-(544, 249), 104x20 Restored Rect: (440, 229)-(544, 249), 104x20 Client Rect: (0, 0)-(104, 20), 104x20 You'll notice that the drop shadow you see is physically outside the window that's being drawn. How can i draw a shadow outside around my window, while being outside my window

Win32: How to draw outside my window?

风流意气都作罢 提交于 2019-11-30 22:55:55
Looking at a Windows tooltips class hint window, i see that it draws its drop-shadow outside the hint window's actual rectangle. Using SpyXX - i can get the tooltip's window rect, and class styles: Rectangle: (440, 229)-(544, 249), 104x20 Restored Rect: (440, 229)-(544, 249), 104x20 Client Rect: (0, 0)-(104, 20), 104x20 You'll notice that the drop shadow you see is physically outside the window that's being drawn. How can i draw a shadow outside around my window, while being outside my window? Note : The shadow is not drawn using the standard CS_DROPSHADOW class style. i've confirmed this

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

对着背影说爱祢 提交于 2019-11-28 21:22:32
i've created a layered window by adding the the WS_EX_LAYERED extended style: wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED; Windows will use black as the chroma key color value. i'm going to leave a large border of black to make the problem obvious: After the window is constructed, i tell it to use black as a chroma-key color : SetLayeredWindowAttributes(hwnd, 0x00000000, 255, LWA_COLORKEY); Now the popup layered window appears partially transparent: The problem is the final step. i want to use CS_DROPSHADOW class style, available since Windows XP, to create a drop-shadow: wndClass

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

我们两清 提交于 2019-11-27 13:47:02
问题 i've created a layered window by adding the the WS_EX_LAYERED extended style: wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED; Windows will use black as the chroma key color value. i'm going to leave a large border of black to make the problem obvious: After the window is constructed, i tell it to use black as a chroma-key color: SetLayeredWindowAttributes(hwnd, 0x00000000, 255, LWA_COLORKEY); Now the popup layered window appears partially transparent: The problem is the final step. i