Transfer from c to c ++
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
public class SynchronizedScrollRichTextBox : System.Windows.Forms.RichTextBox
{
public event vScrollEventHandler vScroll;
public delegate void vScrollEventHandler(System.Windows.Forms.Message message);public const int WM\_VSCROLL = 0x115; protected override void WndProc(ref System.Windows.Forms.Message msg) { if (msg.Msg == WM\_VSCROLL) { if (vScroll != null) { vScroll(msg); } } base.WndProc(ref msg); } public void PubWndProc(ref System.Windows.Forms.Message msg) { base.WndProc(ref msg); }
}
private void synchronizedScrollRichTextBox1_vScroll(Message message)
{
message.HWnd = synchronizedScrollRichTextBox2.Handle;
synchronizedScrollRichTextBox2.PubWndProc(ref message);
}Hello, help me translate this code, written in c # and taken from here ,into c ++.
Synchronized RichTextBox objects (or how to scroll 2 RichTextBox objects together)[^]