System.IntPtr question

  • Thread starter Thread starter ScOe
  • Start date Start date
S

ScOe

I have directx namespace which contains few class-es (dx wrapper)
Direct3d.Device expect System.IntPtr in passed parameters.
When using it in main class i pass "this" as parameter ..
how do i pass IntPtr from main class to my custom class?
i tried with
form.Handle
but that doesnt work ...
 
-
I have directx namespace which contains few class-es (dx wrapper)
Direct3d.Device expect System.IntPtr in passed parameters.
When using it in main class i pass "this" as parameter ..
how do i pass IntPtr from main class to my custom class?
i tried with
form.Handle
but that doesnt work ...

You can use the FindWindow method to get the handle (IntPtr) for your form.
Here is the link on msdn for findwindows
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui
/windowsuserinterface/windowing/windows/windowreference/windowfunctions/find
window.asp



--
Adrian Mascarenhas, Developer Division

This posting is provided "AS IS" with no warranties, and confers no rights.

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
I have directx namespace which contains few class-es (dx wrapper)
Direct3d.Device expect System.IntPtr in passed parameters.
When using it in main class i pass "this" as parameter ..
how do i pass IntPtr from main class to my custom class?
i tried with
form.Handle

What exactly didn't work with form.Handle? It returns the handle of the
window and if your method expects a window handle it *must* work.
 

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