Hi Herman
That is cool. It gets the line to the top.
I have long been thinking of using SendMessage to correspond between other foxpro programs (possibly on different computers) but I am not sure what I can pass in the WPARAM & LPARAM parameters and exactly how I pick them up in the receiving program.
Do you know?
regards
Geoff Scott
>>How does one get the handle for the RichTextControl?
>>
>
>Hi Geoff,
>RichTextControl already has a hWnd property. You can use it directly
>
>Update:
>BTW, try this code:
>
>** Click Event
>#Define EM_LINESCROLL 0xB6
>#Define EM_GETFIRSTVISIBLELINE 0xCE
>
>Declare Long SendMessage in User32 ;
> Long nhWnd, Long uMsg, Long wParam, Long lParam
>Declare Long PostMessage in User32 ;
> Long nhWnd, Long uMsg, Long wParam, Long lParam
>
>With ThisForm.oRTF
> nLine = .GetLineFromChar( .SelStart )
> If (nLineNo > 0)
> nLineNo = nLineNo - SendMessage( .hWnd, EM_GETFIRSTVISIBLELINE, 0, 0 )
> If (nLineNo > 0)
> PostMessage( .hWnd, EM_LINESCROLL, 0, nLineNo )
> endif
> endif
>EndWith
>
>
>Regards
May all your weeds be wildflowers