Results 1 to 6 of 6

Thread: Get Bits of an HDC

  1. #1
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 02
    Posts
    1,037

    Get Bits of an HDC

    I want access to the bit values of an HDC. How can I get them? No, I am not talking about making a Double Buffer. I'm trying to eliminate some backbuffers.

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 02
    Location
    @ Opera Software
    Posts
    10,191

    Re: Get Bits of an HDC

    Do you mean the colors or the bit depth?

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 00
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Get Bits of an HDC

    colour and bit depth are part of the bitmap note, not the device context
    If you want to remove the backbuffers, you can use selectobject on the dc and then deleteobject it.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 02
    Location
    @ Opera Software
    Posts
    10,191

    Re: Get Bits of an HDC

    But why is he then talking about bit values. Don't you get that by using GetPixel()...

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 00
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Get Bits of an HDC

    Quote Originally Posted by NoteMe
    But why is he then talking about bit values. Don't you get that by using GetPixel()...
    yeah.. that's confusing me, if he is talking about the bitmap, then getDIBbits (sic?) get access to the bits..
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 02
    Posts
    1,037

    Re: Get Bits of an HDC

    I wasn't thinking straight. Been programming now for over 10 hrs; I'm ready to shutdown.

    SetPixel is too slow, which is why I avoid it, but the right idea. I think I'll just use a blitting workaround.

    Thanks for the help.

Posting Permissions

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