S
Steve Barnett
I have an app that includes two side by side Rich Text controls. What I need
to do is keep both controls synchronised, such that if I scroll the left rtb
up or down then the right one scrolls by the same amount in the same
direction.
In my simplistic mind, I believe that this can be achieved by sending an
EM_GetScrollPos message to the left rtb and using the results to send an
EM_SetScrollPos message to the right one. Problem is that I'm converting
over from VB6 and have no idea how to
a) Call the SendMessage API,
b) Code a "POINT" structure in C# for use in the call, or
c) Find the windows handle of the Rich Text box.
All of which means that I have a very long way to go to achieve a very
simple function. Can anyone please point me at some code that does this
please? Better still, can I achieve this in native C# code?
Thanks
Steve
to do is keep both controls synchronised, such that if I scroll the left rtb
up or down then the right one scrolls by the same amount in the same
direction.
In my simplistic mind, I believe that this can be achieved by sending an
EM_GetScrollPos message to the left rtb and using the results to send an
EM_SetScrollPos message to the right one. Problem is that I'm converting
over from VB6 and have no idea how to
a) Call the SendMessage API,
b) Code a "POINT" structure in C# for use in the call, or
c) Find the windows handle of the Rich Text box.
All of which means that I have a very long way to go to achieve a very
simple function. Can anyone please point me at some code that does this
please? Better still, can I achieve this in native C# code?
Thanks
Steve