Conversion from System::IntPtr to HWND 
Author Message
 Conversion from System::IntPtr to HWND

I'm attempting to wrap the DirectX 8 API with C++ .NET, for use by VB
.NET. I cannot specify the HWND for the form to render to, because I
cannot pass in a HWND data type, and cannot convert from anything to
HWND, that I can find. I have combed the message boards and have found
nothing applicable.
If anyone could help me with converting the data types, It would be
much appreciated.
Thanks
Dale


Tue, 12 Apr 2005 08:56:27 GMT  
 Conversion from System::IntPtr to HWND
Dale,

Quote:
> I'm attempting to wrap the DirectX 8 API with C++ .NET, for use by VB
> .NET. I cannot specify the HWND for the form to render to, because I
> cannot pass in a HWND data type, and cannot convert from anything to
> HWND, that I can find. I have combed the message boards and have found
> nothing applicable.
> If anyone could help me with converting the data types, It would be
> much appreciated.

How about this:

IntPtr ptr = ....;
HWND hwnd = (HWND)ptr.ToPointer();

--
Tomas Restrepo



Tue, 12 Apr 2005 09:26:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. IntPtr --> HWND

2. hWnd and hDC conversions

3. Obtaining HWND in system wide hook DLL?

4. Obtaining HWND in system wide hook DLL?

5. hWnd for System Taskbar

6. Getting hwnd of System Tray Programs

7. How to get HWND in ::GetDlgItem(HWND hDlg,ID_SECTIONS) before dlg.DoModal()

8. Question on HWND hDlg Parameter in ::SetDlgItemText(HWND hDlg, int nIDDlgItem, LPTSTR lpString, int nMaxCount)

9. How to get HWND in ::GetDlgItem(HWND hDlg,ID_SECTIONS) before dlg.DoModal()

10. HWND hWnd

11. Question on HWND hDlg Parameter in ::SetDlgItemText(HWND hDlg, int nIDDlgItem, LPTSTR lpString, int nMaxCount)

12. DestroyWindow( HWND hWnd ) doesnt kill window

 

 
Powered by phpBB® Forum Software