문제

I have a richedit containing lines using different fonts, styles, languages etc.

I am drawing in a gutter. I would like to start my drawing at the same y pixel position as the corresponding line.

도움이 되었습니까?

해결책

Send the control an em_PosFromChar message. It returns the client coordinates of the character at the given index, although the documentation doesn't say what the coordinates represent (upper left corner, baseline center, or what). You're looking for the character's baseline.

Use em_LineIndex to get a character index for a given line number, if you don't already know the index of a character you're interested in.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top