Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rtf ole control - positioning
Message
From
09/02/2006 17:44:14
 
 
To
09/02/2006 17:18:57
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01095180
Message ID:
01095296
Views:
16
This message has been marked as the solution to the initial question of the thread.
>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
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform