tags:

views:

15

answers:

1

How do I make modal windows with non square borders, for instance a modal window which has a corner to indicate it's coming (sorta being shout) from a text.

A: 

Create your modal dialog window as you would normally and then call SetWindowRgn API to set the non-rectangular region you want to achieve.

Note that this will not allow you to do semi-transparent effects, it works only for opaque windows. If you want alpha blending, your window has to be top-level (alpha transparency is not supported for child windows) and you should be usign different APIs.

Also, this works for C++ clients using the native Win32 API. If you are writing C#/VB.Net code, you need to specify if you are using WinForms or WPF, as the solution is different for these.

Franci Penov
I am using web applications. Would this still work?
Nope, this is not going to work for web applications. :-)
Franci Penov