Converting IntPtr to HWND

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

How do I convert a System::IntPtr returned by .net as a handle to an actual
Win32 handle like an HWND ? Attempts to use static_cast<HWND>(anIntPtr) do
not work.
 
Convert to void* before cast, like this:

HWND handle = static_cast<HWND>(anIntPtr.ToPointer());

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top