Results 1 to 6 of 6

Thread: What is a DC?

  1. #1
    Guest
    Hi.

    I know the words: Compatible Device. But what does that means and mainly, why should I use them?

    Thanks.

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Red face

    That's one of the most funny posts I ever read here! Not because the question is silly (IT IS NOT!!), but because you can find a HDC in nearly every answer about graphic stuff, and noone is answering this now!

    So I think DC means Device Context.

    It normaly stores a bitmap (map of pixel).

    But when you program and you only have to give a long of course there is no bitmap stored in this long! Actualy it is a Handle to the DC! (hDC)

    If somebody know better would be interesting for me, too.

    Cu
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3
    Guest

    Thats more a handle...

    Thanks Misanthrop, but I need a little more information.

    First, I was off track complettly with my "Compatible Device", it is more "Device Context" (thanks to Misanthrop). And I understand what a "Handle" means (hDC) and why we need it. But why would I use the CreateCompatibleDC, CreateDC, GetDC APIs? These APIs seem to be used in a lot of graphic algorithm. Since I have quite a few graphic problems to solve these days, I'd like to know if this could help me.

    So if anyone has more information about that

    Thanks.

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    With GetDC for exmaple you can get a window's DC (if you know it's handle, the hWnd). CreateDC is used to... create DCs Empty buffers. CreateCompatibleDC create a DC which 'works for sure', else you have to set several information by yourself.

    Hope this helps a bit

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    Yes that's right fox!

    It is just a cool way to greate new DCs for Bitmaps, that fit exactly your needs and You don't need to waste memory and speed with the Pictureboxes!
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6
    Guest

    Thanks guys!

    All right! That's clear enough.

    Thanks!

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