views:

106

answers:

2

Hello,

How can I create a Win32 window like Sticky Note in Windows 7 which has no border but has drop down shadow effect?

I have tried to create a Win32 window without borders (remove ~WS_BORDER), but the drop down effect shadow is gone.

Any idea?

Best regards, Zach@Shine

A: 

I think you could do this in C# WinForms without too much trouble. You can set the form's border style to none, do some transparency mask tricks for both graphics and hit-tests.

I've done transparency & hit-test masks, and I've done no-border form windows, but I haven't done both together.

uosɐſ
How can I do this in VC++?
Zach
+2  A: 

Apply the CS_DROPSHADOW window class (You can apply with SetClassLongPtr/GCL_STYLE at runtime iirc)

Alex K.
If you look carefully, you can find there is a little difference between the shadow by CS_DROPSHADOW and the shadow of Sticky Notes.
Zach