CRichEditCTrl - Getting char height using ITextRange

abc abc 351 Reputation points
2020-10-05T07:55:27.59+00:00

Hi,

In my MFC application I subclassed CRicheditctrl, whenever I am moving the cursor, OnSetCUrsor can I use ITextRange to get the height of the character where cursor is placed.
ITextRange *pTextRange;
m_pDoc->RangeFromPoint(point.x,point.y,&pTextRange);

I tried with ITextRange->GetPoint() , using tomstart and tomend but it is not giving correct rectangle?
Please help me

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,530 questions
{count} votes