May 17th, 1999, 06:17 PM
Hi,
I am trying to use the function FormatRange of CRichEditCtrl to display its content on the screen.
When the mapping mode is MM_TEXT, I have no problem and use kind of the following code:
edit.SetWindowText("Type your text here");
FORMATRANGE fr;
fr.hdc = pDC->m_hDC;
fr.hdcTarget = pDC->m_hDC;
fr.rc = CRect(0, 0, 1440, 1440);
fr.rcPage = CRect(0, 0, 0, 0);
fr.chrg.cpMin = 0;
fr.chrg.cpMax = -1;
edit.FormatRange(&fr);
However, when I set the mapping mode to MM_LOENGLISH just before, I can't seem to make FormatRange work.
Thanks a lot
Marc
I am trying to use the function FormatRange of CRichEditCtrl to display its content on the screen.
When the mapping mode is MM_TEXT, I have no problem and use kind of the following code:
edit.SetWindowText("Type your text here");
FORMATRANGE fr;
fr.hdc = pDC->m_hDC;
fr.hdcTarget = pDC->m_hDC;
fr.rc = CRect(0, 0, 1440, 1440);
fr.rcPage = CRect(0, 0, 0, 0);
fr.chrg.cpMin = 0;
fr.chrg.cpMax = -1;
edit.FormatRange(&fr);
However, when I set the mapping mode to MM_LOENGLISH just before, I can't seem to make FormatRange work.
Thanks a lot
Marc