Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Fri, 8 Aug 2008 12:42:52 +0100,    group: microsoft.public.win32.programmer.ui        back       


Text caret   
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
date: Fri, 8 Aug 2008 12:42:52 +0100   author:   Leo Seccia

Re: Text caret   
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.
date: Sat, 9 Aug 2008 13:30:00 -0700   author:   Somebody

Re: Text caret   
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.
>
>
date: Mon, 11 Aug 2008 11:09:31 +0100   author:   Leo Seccia

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us