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