|
-
October 2nd, 2009, 07:54 AM
#1
Getting cursor position on line in Microsoft Word without hidden chars
Okay,so first of all, sorry if this is the wrong forum. If anyone can direct me to a better one, I'll swiftly remove the thread the best I can 
Anyway, here the thing.
I work on a program that reads text from word for handicapped school children. Since it also reads from other programs, it keeps the text of each line in a buffer, and reads from where the cursor is.
Now, to the question.
In word, I can call Selection.Range.Start in the word api, but this returns the position of the cursor with hidden chars. This confuses my program and I need the very same cursor position wihout the hidden text.
Now, as I can get the text without the hidden chars, I thought I'd just get the text before the cursor, and count the length of it. This however I have not been able to, as all calls to setrange have failed.
So to repeat the key question here: How do I get the number of chars on the current line before the cursor, not including hidden chars.
Oh and in C++ without MFC and without word.h
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|