cyrilbdt
asked on
CRichEditCtrl Problem?
I am trying to develop application that support simple drawing shapes and allow to insert as well a text frame.
I made a doc/view application. In my document class I have a CMyList member that contains object representing various shapes: rect, circle and so on. I drew them using CDC class members. For text frame I use CRichEditCtrl.
The problem is that I can't make them work together. When I drag some of the simple objects the text frame don't repaint itself correctly. Beside that I can't put it in my Z-order supported by my view class and can't zoom it.
I made a doc/view application. In my document class I have a CMyList member that contains object representing various shapes: rect, circle and so on. I drew them using CDC class members. For text frame I use CRichEditCtrl.
The problem is that I can't make them work together. When I drag some of the simple objects the text frame don't repaint itself correctly. Beside that I can't put it in my Z-order supported by my view class and can't zoom it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, you cannot tell the control to draw to a memory dc. You'll have to use the font changing method.
ASKER
I find better decision to the problem - CRichEditCtrl::FormatRange (). It paint control in target dc and can zoom it, just what I want. But know I have problems with finding out what "TWIPS" means, but I'll handle it.
There are 1440 twips to an inch. Do a query (not a search) on twips in the VC++ online help.
ASKER
About zooming - I have idea but I don't know how to do it.
Can I draw CRichEditCtrl in memory dc and then, using StrechBlt to draw it in view?