开发者

Is there a way to Zoom a Rich Textbox's contents in VB6?

开发者 https://www.devze.com 2022-12-15 03:28 出处:网络
I am try开发者_如何学Going 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).No, but you might be able to simulate

I am try开发者_如何学Going 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).


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!)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号