I am trying to zoom (resize) the contents of a rich text box in VB6 so that all the content is visible. (I zoom out until the scroll bars disapear).
+2
A:
No, but you might be able to simulate it by the following.
- create a large form and position if offscreen somewhere
- put your RichEdit (or a copy of it) onto this form
- size the RichEdit so that it can hold everything without scrollbars
- create a memory dc (
CreateDC
) and select a bitmap into it that's large enough to hold the contents of your RichEdit (CreateDIBSection
) - send the offscreen RichEdit a
WM_PRINTCLIENT
message containing the memory DC StretchBlt
from the Memory DC to the screen where you want your zoomed view.(whew!)
John Knoeller
2009-12-22 23:57:26