RichEditCtrl & Printing & TabStops
Robertson David -- davidr@devmail.sps.mot.com Thursday, July 11, 1996 Hello fellow MFCers, I am using VC++ 4.1, running on NT/Win95/Win32s. I recently converted my application to use CRichEdit Doc/View. The default print and print preview does not work! It seems to clip some of the text. I generated a fresh new default application from AppWiz, and it does the same. The WordPad example seems to make it work, but as of now, I haven't had a chance to figure it out. Can anybody offer the magic solution? On another different but similar issue, I need my RichEdit to allow selectable fixed-pitch fonts, as well as configurable tab stops. The font issue has been resolved, at least until the print issue throws a kink in the gears. The tab stops for a RichEdit are based on inches, not character spaces, so does anyone know how to obtain the proper inch conversion based on a configurable font? //==================================================// // David Robertson davidr@devmail.sps.mot.com // // davidr@inetport.com // //==================================================//
Pradeep -- pradeep@corus.com Monday, July 15, 1996 [Mini-digest: 2 responses] for the printing bug add the following lines to your view's constructor. CYourView::CYourView() { CRect marginRect; marginRect.SetRect(360,360,360,360) ; // this will leave 1/4 inches around the printed page SetMargins(marginRect); if (m_nWordWrap == WrapToTargetDevice) { WrapChanged(); } } -Pradeep -----From: Dave KolbI have reported this same problem to MSFT and posted here before with no joy - pls call MSFT and complain that this really neat common control does not support MFC print preview correctly. The new NT 4.0 beta 2 has a riched20.dll (see recent MSJ NT 4.0 article) that you can LoadLibray on and then later use RichEdit2A class but this seems to fail even worse with RTF text. The problem is with the underlying common control using it's own DC supposedly. I could get the preview to work OK on a 1280x1024 but not a 1024x768 screen. I also got WordPad to demonstrate the same problem. Dave Kolb > >//==================================================// >// David Robertson davidr@devmail.sps.mot.com // >// davidr@inetport.com // >//==================================================// > > > Dave Kolb Compuserve: 72410,407@compuserve.com SAS Institute, Inc. EMAIL: sasdxk@unx.sas.com SAS Campus Drive - R3282 Phone: (919) 677-8000 x6827 Cary, NC 27513-2414 USA FAX: (919) 677-8123
| Вернуться в корень Архива |