質問

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