I tried to do with SetWindowRgn, and I couldn’t.
Can do that (the top 2 corners are rounded, the window has a shadow) like on this picture?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a code sample of how to set the window region with shadow:
(Notes: The Form
BorderStyleassumed to bebsNone, not re-sizable)Another way to draw a custom shadow would be to set Window
WS_EX_LAYEREDand useUpdateLayeredWindowHere is a very good example of how it’s done (sources are in C++ but very easy to understand)
For more complicated shapes you can use a
PNGimage on the form and Alpha Blend it.EDIT:
Resizing a
WS_POPUPWindow is a world of pain…You have a few options:
WM_Syscommand$F008to resize (above link) or$F012to move the Window.WS_EX_STATICEDGEandWS_SIZEBOXstyles.NOTE that you need to re-create the Window region when you re-size it (e.g
OnResizeevent).