If you can do it in MFC, then you can do it in C# too by importing the SendMessage API call:
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, StringBuilder lParam);
You can find sample usage of SendMessage in this link.