<2yuexuewrote in message news:%2****************@TK2MSFTNGP06.phx.gbl...
>I have a dialog application that is created using
VC++ 6.0 and a Windows form application using
.NET 2003. I'd like to access the Dialog from the
form. I have tried every thing I know to write a
wrapper class for the dialog class but failed.
Well, you don't say what you tried and how it failed.
Would someone here help me out on this?
Assuming that your resides in a DLL and exposes a flat interface, you have
at least three ways to go:
1) Use Platform/Invole aka P/Invoke aka P/Invoke to call from the managed
code to unmanaged code
http://msdn.microsoft.com/library/de...keexamples.asp
2) Use "It just works" aka IJW aka C++ interop in place of Platform/Invoke
http://msdn.microsoft.com/library/de...onServices.asp
3) Wrap up the native code into a COM object and use the framework's support
for COm
http://msdn.microsoft.com/library/de...cominterop.asp
Regards,
Will