Board index » cppbuilder » Converting Mouse Pos to Caret Pos in Rich Edit

Converting Mouse Pos to Caret Pos in Rich Edit


2004-07-13 10:18:32 AM
cppbuilder65
Is there a function that does something like:
"MousePosToCharPos( )"?
I'm trying to create hyperlinks within a richedit control to connect to
different dialogs within the same program. I haven't found any rich edit
methods that would do this directly so I thought I'd create my own hyperlink
methods.
However I can't figure out how to determine if the mouse pointer is hovering
above a hyperlink text block as I need to convert the current pointer
position within the rich edit control to a caret position.
any suggestions?
 
 

Re:Converting Mouse Pos to Caret Pos in Rich Edit

"Chris G" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a function that does something like:
"MousePosToCharPos( )"?
Look at the EM_CHARFROMPOS message.
Quote
I'm trying to create hyperlinks within a richedit control
to connect to different dialogs within the same program.
I haven't found any rich edit methods that would do this
directly
TRichEdit implements the RichEdit v1.0 control, which does not support that
kind of stuff. RichEdit v2.0 introduced several new features, including
hyperlinking support. You can give a range of characters the CFE_LINK
style, then when the user moves the mouse over that text or clicks on it,
the RichEdit receives EN_LINK notifications that you can respond to as
needed. Look at the following website for information about using RichEdit
v2.0 (and higher) in BCB:
Yet Another Code Site
home.att.net/~robertdunn/Yacs.html
Gambit