Results 1 to 2 of 2

Thread: CreateCompatibleBitmap()

  1. #1

    Thread Starter
    Addicted Member jmiller's Avatar
    Join Date
    Jul 2002
    Location
    University of Michigan
    Posts
    238

    CreateCompatibleBitmap()

    Is it okay to pass zero to this function as the hdc? I've seen some bitmap classes that load an image using LoadImage, and then create an hdc using CreateCompatibleDC, put 0 is passed to this function. I've also seen a blank bitmap created using CreateCompatibleBitmap(), and then the DC is created using CreateCompatibleDC(), but a value is required other than zero. What is the purpose of passing a value to CreateCompatibleDC()? When and when can't 0 be used?

    thanks,
    jmiller

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You can pass NULL, but then you'll get a black/white bitmap/dc. The value passed to the two functions is the dc that the new object should be compatible to.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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