CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2001
    Posts
    165

    BitBlt and changing background color

    I would like to be able to save and or print my form. I am using code I found on codeguru to do just this utilizing the bitblt function. My form is designed to use a black background as this looks best on screen but I would like to print using a white background to save on ink/toner. I thought that the raster option WHITENESS would do this but it just fills the picture with white. Is there a quick way to do this?

    -K


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: BitBlt and changing background color

    Method 1: Use vbDstInvert as the last parameter of BitBlt. The destination picturebox should have the picture you want to invert.

    Method 2: Create a RECT structure that encompasses the whole picture, then, use InvertRgn.

    Both methods will change not only the background but the text too from light to dark.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured