D
Dave
Hello, I have little experience with VB or .Net in general but have a
DLL control written in C++ using MFC -- it is a graphical routine that
takes place primarily in OnPaint. Is there a way to insert this into
VB? If so are there examples I could download?
My primary concerns are 1) where to put this in the VB project, and 2)
Converting C++ parameters to .Net variable types.
I'm looking at the technique of using platform invoke described here:
http://www.codeproject.com/dotnet/PInvoke.asp?print=true
Is there a way to import the following C++ 'create' command into VB?
BOOL CreateCtrl(CWnd* pParentWnd, int top, int left, int bottom, int
right, UINT nID, DWORD dwStyle = WS_VISIBLE);
I'm trying the following in Form1.vb but can seem to get it to work:
<DllImport("MyMFCDLL.dll")> Public Shared Function CreateCtrl(ByVal
prnt As Object, ByVal top As Int32, ByVal left As Int32, ByVal bottom
As Int32, ByVal right As Int32, ByVal id As UInt32) As Boolean
End Function
Thanks.
DLL control written in C++ using MFC -- it is a graphical routine that
takes place primarily in OnPaint. Is there a way to insert this into
VB? If so are there examples I could download?
My primary concerns are 1) where to put this in the VB project, and 2)
Converting C++ parameters to .Net variable types.
I'm looking at the technique of using platform invoke described here:
http://www.codeproject.com/dotnet/PInvoke.asp?print=true
Is there a way to import the following C++ 'create' command into VB?
BOOL CreateCtrl(CWnd* pParentWnd, int top, int left, int bottom, int
right, UINT nID, DWORD dwStyle = WS_VISIBLE);
I'm trying the following in Form1.vb but can seem to get it to work:
<DllImport("MyMFCDLL.dll")> Public Shared Function CreateCtrl(ByVal
prnt As Object, ByVal top As Int32, ByVal left As Int32, ByVal bottom
As Int32, ByVal right As Int32, ByVal id As UInt32) As Boolean
End Function
Thanks.