I have a MFC application that I want the frame window to have a custom
window region, but I still want to keep the Windows XP visual style.

I found this Microsoft article

Enabling Visual Styles
http://msdn2.microsoft.com/en-us/library/bb773175(VS.85).aspx

saying that if you applied a non-NULL region by SetWindowRgn, UxTheme
manager will assume this as a specialized window and will not use
visual style.

Is there a way to work around this if I want both non-NULL windows
region and visual style?

Any pointer is appreciated.

Thanks.