Aero effect Shadow, and transparency goes away if Rgn APIs are used
i have a Default MFC Application, and i have an imaginary Rectangle(larger then MFC Apps) in the Desktops,
i want to clip the MFC applications when it moves beyond that rectangle. here is what i have been doing
i used SetWindowRgn() with the offset rects, and i am able to clip it.
but for some unknown reason, the tranperency and shadow effect goes away when i am using SetWindowRgn, is there any way to keep transperance and Shodow effect.
then i dug more that found that there is a message(WM_DWMNCRENDERINGCHANGED fRenderingEnabled:False) that is sent to my widnow when i apply region API, and when i delete it same message with true (WM_DWMNCRENDERINGCHANGED fRenderingEnabled:True) is sent. looks windows itself is doing it, is there any way to prevent it?
i added a message handle on WM_DWMNCRENDERINGCHANGED message and then try to re-enable it, but strangly for the first time it works multiple tries it does not work.