I'm working with a Win32 application that needs to create a variety of custom window types. In particular, these windows are often non-rectangle, have shadows, or are mostly transparent.
I'm currently using WS_EX_LAYERED
with UpdateLayeredWindow
to create transparent windows that I can then draw my arbitrary graphics on. However, I find layered windows to be limiting in that you can't have layered child windows, nor can a layered window properly host 'normal' Win32 controls.
Our code base is several years old, using mostly Win32 and GDI, but we're in the process of modernizing things and it's time to look at newer technologies.
I've considered doing my custom windowing in WPF, but I'm concerned about what I've read about 'airspace' issues. It seems that WPF uses layered windows to accomplish its per-pixel alpha blending and so seems like it would also suffer from the limitations I've previously experienced.
I don't know much (anything, really) about Direct2D, but that technology sounds like it might be interesting. Though, I can't find any references to it being able to do overlay windows.
So, all of this brings me to my problem: What's the best technology for doing overlay windows under Windows? (Vista and Win7 at a minimum, XP would be nice to have)
Am I neglecting some, particularly good technology? Any suggestions would be appreciated.
I recommend Direct2D and DirectWrite as you get high-quality rendering that's also ridiculously fast compared to either GDI or anything done in the .Net space. The only problem is that you need Vista or later OS to use it.