Solved

RichEdit: EM_POSFROMCHAR for bottom right corner

Posted on 1998-03-17
2
352 Views
Last Modified: 2013-11-19
I need to know the bottom-right coordinates of a character
in a RichEdit control. Actually I calculate it by performing
the following steps:

    1. get the top-left coordinate by an EM_POSFROMCHAR
    2. calculate the character extent by a
       CDC::GetTextExtent() (called using a temporary
       Device Context)
    3. add the values obtained in steps 1 & 2

the main problem of this solution is in step 2: I need to
select the character for get the relative CHARFORMAT struct,
this cause a flickering problem with the selection.

There's someone that have a better idea?

Thank's in advance.
0
Comment
Question by:ciutur
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 400 total points
ID: 1317045
Have you tried turning off the redraw flag for the richedit control while you are calculating the text extent?

  SetRedraw(FALSE);
  // do your stuff
  SetRedraw(TRUE);

Then you won't see a flicker for the selection.


0
 

Author Comment

by:ciutur
ID: 1317046
I gift you my points!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Separate files macro - Errors on larger data set 18 69
deburging in oracle form 12 98
matchUp  challenge 6 60
JQuery serialize and unserialize 8 77
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now