How can I get the caret pos which is in other application?

G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

Most of documents said that Use GetCaretPos API to do it".
But, the API can't get caret position except when the App has the caret.

I want to make a application to trace caret which is in other application
such as "Pocket Word","Pocket Excel", etc.

How can I do it?
 

TH

Distinguished
Jun 20, 2004
9
0
18,510
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

First of all, why would you want to do such a thing. To get the current pos
of the caret, I think you'll need to come up with a hack, to get the window
handle of the edit control for Word and pass it on to GetCaretPos... I'm not
sure if pocket word has an automation model or if that's the case, it exposes
the editor at all.

"JutaeKim" wrote:

> Most of documents said that Use GetCaretPos API to do it".
> But, the API can't get caret position except when the App has the caret.
>
> I want to make a application to trace caret which is in other application
> such as "Pocket Word","Pocket Excel", etc.
>
> How can I do it?
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

No, there's no automation for Pocket Word. I don't understand 'why',
either...

Paul T.

"TH" <TH@discussions.microsoft.com> wrote in message
news:A37284A1-614A-4255-98ED-67260B4AEC1E@microsoft.com...
> First of all, why would you want to do such a thing. To get the current
> pos
> of the caret, I think you'll need to come up with a hack, to get the
> window
> handle of the edit control for Word and pass it on to GetCaretPos... I'm
> not
> sure if pocket word has an automation model or if that's the case, it
> exposes
> the editor at all.
>
> "JutaeKim" wrote:
>
>> Most of documents said that Use GetCaretPos API to do it".
>> But, the API can't get caret position except when the App has the caret.
>>
>> I want to make a application to trace caret which is in other application
>> such as "Pocket Word","Pocket Excel", etc.
>>
>> How can I do it?
>>
>>
>>
 
G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

As you knew, CetCaretPos API don't need window handle.
BOOL GetCaretPos(LPPINT lpPoint);
However, I can get the handle of window has caret.

2 years ago, I've succeeded to do it using tracing of IME UI windows instead
of caret.
( I think , I maybe traced candidate window position).
But the method did not work on English OS, because there are no IME UI
windows on it.

So, I'm looking for new solution to trace position of caret which is in
another application.

I ,of course, I considered to make my application as IME.
But I want to make my application can be coexisted with MS-IME is included
in ROM image.

Please let me know your idea.



"TH" <TH@discussions.microsoft.com> wrote in message
news:A37284A1-614A-4255-98ED-67260B4AEC1E@microsoft.com...
> First of all, why would you want to do such a thing. To get the current
pos
> of the caret, I think you'll need to come up with a hack, to get the
window
> handle of the edit control for Word and pass it on to GetCaretPos... I'm
not
> sure if pocket word has an automation model or if that's the case, it
exposes
> the editor at all.
>
> "JutaeKim" wrote:
>
> > Most of documents said that Use GetCaretPos API to do it".
> > But, the API can't get caret position except when the App has the caret.
> >
> > I want to make a application to trace caret which is in other
application
> > such as "Pocket Word","Pocket Excel", etc.
> >
> > How can I do it?
> >
> >
> >
 
G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

But *why*? What possible use would it be to know that the caret position in
Word is after character number 423?

If you want to *insert* text into the currently-focused window, at the
current insert position, you can do that right now without tracing the
internals of the input system with PostKeybdMessage and keybd_event. Tons
of people are doing that and it works fine.

Paul T.

"JutaeKim" <jtkim@timespace21.com> wrote in message
news:uJHuNt4tEHA.3088@tk2msftngp13.phx.gbl...
> As you knew, CetCaretPos API don't need window handle.
> BOOL GetCaretPos(LPPINT lpPoint);
> However, I can get the handle of window has caret.
>
> 2 years ago, I've succeeded to do it using tracing of IME UI windows
> instead
> of caret.
> ( I think , I maybe traced candidate window position).
> But the method did not work on English OS, because there are no IME UI
> windows on it.
>
> So, I'm looking for new solution to trace position of caret which is in
> another application.
>
> I ,of course, I considered to make my application as IME.
> But I want to make my application can be coexisted with MS-IME is included
> in ROM image.
>
> Please let me know your idea.
>
>
>
> "TH" <TH@discussions.microsoft.com> wrote in message
> news:A37284A1-614A-4255-98ED-67260B4AEC1E@microsoft.com...
>> First of all, why would you want to do such a thing. To get the current
> pos
>> of the caret, I think you'll need to come up with a hack, to get the
> window
>> handle of the edit control for Word and pass it on to GetCaretPos... I'm
> not
>> sure if pocket word has an automation model or if that's the case, it
> exposes
>> the editor at all.
>>
>> "JutaeKim" wrote:
>>
>> > Most of documents said that Use GetCaretPos API to do it".
>> > But, the API can't get caret position except when the App has the
>> > caret.
>> >
>> > I want to make a application to trace caret which is in other
> application
>> > such as "Pocket Word","Pocket Excel", etc.
>> >
>> > How can I do it?
>> >
>> >
>> >
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

Thanks for your reply..

I already knew that caret tracing is not needed to insert caracter into the
position of caret.
But I have to display an window at the caret position.
I've seen several applications(.exe) which trace caret position and disply
an window at the postion.
So,I think, there is a solution to trace caret.
If you have some idea, please let me know....

Thank you.

"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message news:O5r1AC5tEHA.1008@tk2msftngp13.phx.gbl...
> But *why*? What possible use would it be to know that the caret position
in
> Word is after character number 423?
>
> If you want to *insert* text into the currently-focused window, at the
> current insert position, you can do that right now without tracing the
> internals of the input system with PostKeybdMessage and keybd_event. Tons
> of people are doing that and it works fine.
>
> Paul T.
>
> "JutaeKim" <jtkim@timespace21.com> wrote in message
> news:uJHuNt4tEHA.3088@tk2msftngp13.phx.gbl...
> > As you knew, CetCaretPos API don't need window handle.
> > BOOL GetCaretPos(LPPINT lpPoint);
> > However, I can get the handle of window has caret.
> >
> > 2 years ago, I've succeeded to do it using tracing of IME UI windows
> > instead
> > of caret.
> > ( I think , I maybe traced candidate window position).
> > But the method did not work on English OS, because there are no IME UI
> > windows on it.
> >
> > So, I'm looking for new solution to trace position of caret which is in
> > another application.
> >
> > I ,of course, I considered to make my application as IME.
> > But I want to make my application can be coexisted with MS-IME is
included
> > in ROM image.
> >
> > Please let me know your idea.
> >
> >
> >
> > "TH" <TH@discussions.microsoft.com> wrote in message
> > news:A37284A1-614A-4255-98ED-67260B4AEC1E@microsoft.com...
> >> First of all, why would you want to do such a thing. To get the current
> > pos
> >> of the caret, I think you'll need to come up with a hack, to get the
> > window
> >> handle of the edit control for Word and pass it on to GetCaretPos...
I'm
> > not
> >> sure if pocket word has an automation model or if that's the case, it
> > exposes
> >> the editor at all.
> >>
> >> "JutaeKim" wrote:
> >>
> >> > Most of documents said that Use GetCaretPos API to do it".
> >> > But, the API can't get caret position except when the App has the
> >> > caret.
> >> >
> >> > I want to make a application to trace caret which is in other
> > application
> >> > such as "Pocket Word","Pocket Excel", etc.
> >> >
> >> > How can I do it?
> >> >
> >> >
> >> >
> >
> >
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.pocketpc,microsoft.public.pocketpc.developer,microsoft.public.windowsce.embedded,microsoft.public.windowsce.embedded.vc (More info?)

Well, I don't think much of the justification, but you might try finding the
foreground window using GetForegroundWindow(), figuring out whether it's an
EDIT control or not and, if so, asking it where the selection point is by
sending it messages...

Paul T.

"JutaeKim" <jtkim@timespace21.com> wrote in message
news:e4NAIO9tEHA.160@TK2MSFTNGP11.phx.gbl...
> Thanks for your reply..
>
> I already knew that caret tracing is not needed to insert caracter into
> the
> position of caret.
> But I have to display an window at the caret position.
> I've seen several applications(.exe) which trace caret position and disply
> an window at the postion.
> So,I think, there is a solution to trace caret.
> If you have some idea, please let me know....
>
> Thank you.
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> wrote in message news:O5r1AC5tEHA.1008@tk2msftngp13.phx.gbl...
>> But *why*? What possible use would it be to know that the caret position
> in
>> Word is after character number 423?
>>
>> If you want to *insert* text into the currently-focused window, at the
>> current insert position, you can do that right now without tracing the
>> internals of the input system with PostKeybdMessage and keybd_event.
>> Tons
>> of people are doing that and it works fine.
>>
>> Paul T.
>>
>> "JutaeKim" <jtkim@timespace21.com> wrote in message
>> news:uJHuNt4tEHA.3088@tk2msftngp13.phx.gbl...
>> > As you knew, CetCaretPos API don't need window handle.
>> > BOOL GetCaretPos(LPPINT lpPoint);
>> > However, I can get the handle of window has caret.
>> >
>> > 2 years ago, I've succeeded to do it using tracing of IME UI windows
>> > instead
>> > of caret.
>> > ( I think , I maybe traced candidate window position).
>> > But the method did not work on English OS, because there are no IME UI
>> > windows on it.
>> >
>> > So, I'm looking for new solution to trace position of caret which is in
>> > another application.
>> >
>> > I ,of course, I considered to make my application as IME.
>> > But I want to make my application can be coexisted with MS-IME is
> included
>> > in ROM image.
>> >
>> > Please let me know your idea.
>> >
>> >
>> >
>> > "TH" <TH@discussions.microsoft.com> wrote in message
>> > news:A37284A1-614A-4255-98ED-67260B4AEC1E@microsoft.com...
>> >> First of all, why would you want to do such a thing. To get the
>> >> current
>> > pos
>> >> of the caret, I think you'll need to come up with a hack, to get the
>> > window
>> >> handle of the edit control for Word and pass it on to GetCaretPos...
> I'm
>> > not
>> >> sure if pocket word has an automation model or if that's the case, it
>> > exposes
>> >> the editor at all.
>> >>
>> >> "JutaeKim" wrote:
>> >>
>> >> > Most of documents said that Use GetCaretPos API to do it".
>> >> > But, the API can't get caret position except when the App has the
>> >> > caret.
>> >> >
>> >> > I want to make a application to trace caret which is in other
>> > application
>> >> > such as "Pocket Word","Pocket Excel", etc.
>> >> >
>> >> > How can I do it?
>> >> >
>> >> >
>> >> >
>> >
>> >
>>
>>
>
>