Hi.
I know the words: Compatible Device. But what does that means and mainly, why should I use them?
Thanks.
Printable View
Hi.
I know the words: Compatible Device. But what does that means and mainly, why should I use them?
Thanks.
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
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.
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 ;)
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!
All right! That's clear enough.
Thanks!