Announcement

Collapse
No announcement yet.

CreateCompatibleBitmap

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CreateCompatibleBitmap



    bhdc = CreateCompatibleDC(hdc)
    bitmaphand= CreateCompatibleBitmap ( bhdc,100,100 )
    SelectObject bhdc, bitmaphand


    I am using the above statements to generate a bitmap. I can bitblt data between my window and the bitmap, draw on the bitmap but for some reason I cannot use color. The bitmap seems to be monochrome.

    Any ideas how I can use color.

    Dave

  • #2
    Are you using %SRCCOPY in you BitBlt call?

    Comment


    • #3
      Yes. I'm using %srccopy.

      Dave

      Comment


      • #4

        dim kk as bitmap
        msgbox(str$(getobject(bitmaphand,sizeof(kk),kk)))
        msgbox(str$(kk.bmBitsPixel))


        This shows the bmBitsPixel is 1.

        Comment


        • #5
          bhdc = CreateCompatibleDC(hdc)
          bitmaphand= CreateCompatibleBitmap ( hdc,100,100 )
          ---
          SelectObject bhdc, bitmaphand

          Comment


          • #6
            Took me a while to see the difference in your code. One letter made all the difference. It now works like a charm.

            Thanks a lot.

            Dave

            Comment

            Working...
            X