0

I have the following C++ code:

HRESULT hr = S_OK;
hr = DwmExtendFrameIntoClientArea(this->Handle, &margins);

But, when I try to compile I get the following error:

error C2664: 'DwmExtendFrameIntoClientArea' : cannot convert parameter 1 from 'System::IntPtr' to 'HWND'

Is there any other method to get the HWND of my form?

Victor
  • 13,914
  • 19
  • 78
  • 147
  • 1
    [A possible duplicate here](http://stackoverflow.com/questions/10621437/how-to-get-a-hwnd-handle-out-of-a-system-windows-forms-form) – UltraInstinct Nov 18 '12 at 09:01
  • The conversion works, but the `DwmExtendFrameIntoClientArea` still does not work... – Victor Nov 18 '12 at 09:05

0 Answers0