CRichEditCtrl and 'what you see is what you get' problem
-
Hello, I use several controls with the CMainFrame=>CView. These controls are for putting different values like 'amount', 'price', and 'text'. There is also possibility to print all CView content. And the problem is with setting 'what you see is what you get' for CRichEditCtrl. My CRichEditCtrl is calculated to have 8 cm + some offset width, because text printed, and print previewed has also 8 cm width. I would like the text in my CRichEditCtrl looked identical as on the printout. So I use CRichEditCtrl::SetTargetDevice(...) in order to set: 1. Printer DC 2. line width calculated as 8 cm. After I used SetTargetDevice the word wrapping is the same as on the printout, but there is still very big problem. I mean the text is very often partly shifted out of the CRichEditCtrl in the horizontal view. It looks like CRichEditCtrl didn't have enough space to contain all text width, but it is not true. It really has 8 cm + offset. The line set with SetTargetDivice has also 8 cm width. So I don't understand why the CRichEditControl does not contain whole text width. I checked the same text, with the same font setting, with the same margin in the MS Word, and in MS Word everything looks fine. Whole text is well fitted. My question is: Did i miss some setting? What am i doing wrong here? Or maybe I should get "what you see is what you get" in some other way? I'm including printscreen showing the problem: http://rapidshare.com/files/157373743/Screen.png[^] Regards.