Given a TextNode that has as the first Paragraph:
ABYX~ \ ab<cr>
I want to set a Caret to the End of a Run so I can do this and get the "plain text":
wprintf(L"[%s]\n", textBlock->ToString(*runCaret, *endOfCurrentRun));
So I do this:
CaretPtr endOfCurrentRun = runCaret->Clone(); endOfCurrentRun->MoveToNextRun();
and I get the <cr> included (The "length" is reported as 11). If I do this:
CaretPtr endOfCurrentRun = runCaret->Clone(); endOfCurrentRun->MoveToNextRun(); endOfCurrentRun->MoveToPreviousCharacter();
I get "ABYZ~ \ ab". (The length is reported as 9) The ending "c' is left off.
So. how to set the "endOfCurrentRun" Caret to return the proper, complete string? I am interested in getting the Carets set properly, NOT the resulting string. I'm just using the string to verify the Caret positions..
Bruce