title: Possible to use WM_NCPAINT and still get the shadow behind a window on Aero?
body: <p>Currently, I'm trying to have a top-level window in Windows Forms with a custom frame (using DevExpress' <a href="http://documentation.devexpress.com/#WindowsForms/DevExpressSkinsSkinManager_EnableFormSkinstopic" rel="nofollow noreferrer"><code>SkinManager.EnableFormSkins</code> function</a>) and still <strong>have a shadow around the window</strong>, when running on Windows 7 Aero.</p>
  <p>The window currently looks like this:</p>
  <p><img src="https://i.stack.imgur.com/2F7qp.png" alt="enter image description here" /></p>
  <p>and I want it to look like this:</p>
  <p><img src="https://i.stack.imgur.com/ps8BI.png" alt="enter image description here" /></p>
  <p>(I.e. have a soft shadow around the window).</p>
  <p>I did a lot of research and try-and-error, including using <code>CS_DROPSHADOW</code>, <a href="http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q389001" rel="nofollow noreferrer">asking the DevExpress support</a>, <a href="https://stackoverflow.com/questions/1146365/">reading on SO</a>, <a href="https://web.archive.org/web/20120419134751/https://bengoodger.com/2008/09/" rel="nofollow noreferrer">other blogs</a> and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa969508%28v=vs.85%29.aspx" rel="nofollow noreferrer">MSDN documentation</a>.</p>
  <p>Still, nothing brings a shadow to my window.</p>
  <p>Although I think that my requirement simply is not possible to achieve, I still want to take the chance and ask here on SO.</p>
  <p>(I even thought of faking this by having a native Aero window behind my actual window but failed to implement...)</p>
  <p><strong>My question is:</strong></p>
  <p>Is it possible to have a window with a custom-drawn non-client (NC) area and still get a shadow around this window when Aero is active?</p>