Господа здравствуйте!
Подскажите плиз как с помощью именно CRichEditCtrl
распечатать текст, который находится в нем?
А то я что-то бьюсь и не получается.
Здравствуйте john, 18.04.2001 01:27:42 вы писали:
>Господа здравствуйте! >Подскажите плиз как с помощью именно CRichEditCtrl >распечатать текст, который находится в нем? >А то я что-то бьюсь и не получается.
Здравствуйте stone, 18.04.2001 02:52:00 вы писали:
>>См. >FormatRange() >DisplayBand()
Я знаю про эти функции, но толку пока никакого.
Вот что я делаю:
FORMATRANGE fr;
// Get the page width and height from the printer.
long lPageWidth = ::MulDiv(MyPrinterDC.GetDeviceCaps(PHYSICALWIDTH),
1440, MyPrinterDC.GetDeviceCaps(LOGPIXELSX));
long lPageHeight = ::MulDiv(MyPrinterDC.GetDeviceCaps(PHYSICALHEIGHT),
1440, MyPrinterDC.GetDeviceCaps(LOGPIXELSY));
CRect rcPage(0, 0, lPageWidth, lPageHeight);
m_re.SetTargetDevice(MyPrinterDC, lPageWidth);
// Format the text and render it to the printer.
fr.hdc = MyPrinterDC.m_hDC;
fr.hdcTarget = MyPrinterDC.m_hDC;
fr.rc = rcPage;
fr.rcPage = rcPage;
fr.chrg.cpMin = 0;
fr.chrg.cpMax = -1;
m_re.FormatRange(&fr, TRUE);
// Update the display with the new formatting.
RECT rcClient;
m_re.GetClientRect(&rcClient);
m_re.DisplayBand(&rcClient);
Однако ничего не печатается :((
Что не так? Может подскажешь?