Hello everyone, I hope this is a good place to post this. I'm trying to get caret and text info from 3rd party (eg. not my own) applications... I use get GetCaretPos (user32.dll) to get the top point (x,y) of the caret but I am now stucked as I need to find either the height of the caret or the bottom point of the caret. Additionally I would like to get the text of the current line and the position (in the line) the caret is on. Is there a reliable way to do this? Thanks in advance Leo
See inlined responses... "Leo Seccia" wrote in message news:EA76CFC0-3E38-437C-8A2C-9F30923D3BDD@microsoft.com... > Hello everyone, > > I hope this is a good place to post this. > > I'm trying to get caret and text info from 3rd party (eg. not my own) > applications... > > I use get GetCaretPos (user32.dll) to get the top point (x,y) of the caret > but I am now stucked as I need to find either the height of the caret or > the bottom point of the caret. Use GetGUIThreadInfo() to get the full caret rectangle. You'll need the thread ID of the other app. > Additionally I would like to get the text of the current line and the > position (in the line) the caret is on. Is there a reliable way to do > this? You can't do this from a different process. Address spaces (like pointers for example) are not shareable across processes. You'd need to inject something into the other app and marshall the text across back to your app.
Thank you. Leo "Somebody" wrote in message news:g7nnk.8176$3l5.4294@newsfe06.iad... > See inlined responses... > > "Leo Seccia" wrote in message > news:EA76CFC0-3E38-437C-8A2C-9F30923D3BDD@microsoft.com... >> Hello everyone, >> >> I hope this is a good place to post this. >> >> I'm trying to get caret and text info from 3rd party (eg. not my own) >> applications... >> >> I use get GetCaretPos (user32.dll) to get the top point (x,y) of the >> caret but I am now stucked as I need to find either the height of the >> caret or the bottom point of the caret. > > Use GetGUIThreadInfo() to get the full caret rectangle. You'll need the > thread ID of the other app. > >> Additionally I would like to get the text of the current line and the >> position (in the line) the caret is on. Is there a reliable way to do >> this? > > You can't do this from a different process. Address spaces (like pointers > for example) are not shareable across processes. You'd need to inject > something into the other app and marshall the text across back to your > app. > >