Sign in to follow this  

[.net] From VB to Visual C++

Recommended Posts

How to change this function to Visual C++ Whidbey? Public Sub AddControl(ByVal RTFControl As Object) Dim objControlSubClass As New clsWindowSubClass(RTFControl.Handle,RTFControl, Me) aControls.Add(objControlSubClass) End Sub I was confused, because New is a VB keyword but it can be used as a function name here. And also, as the parameter, it use Object type as the data type but when I tried to find property Handle, I could not found it. So, what type I should use? Thanks.. The clsWindowSubClass: Public Class clsWindowSubClass Inherits System.Windows.Forms.NativeWindow Private objWindow As Object Private objParent As clsRTFScrollSync Public Sub New(ByVal Handle As IntPtr, ByVal Window As Object, ByVal Parent As clsRTFScrollSync) objWindow = Window objParent = Parent MyBase.AssignHandle(Handle) End Sub Protected Overrides Sub WndProc(ByRef WindowMessage As _ system.Windows.Forms.Message) MyBase.WndProc(WindowMessage) objParent.SyncScrollBars(MyBase.Handle, Me, _ objWindow, WindowMessage) End Sub End Class

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this