In my prog, I make plenty of calls to SetPixelV. My code goes something like this: invoke GetDC ,hWnd ;Valid window handle mov hDC,eax invoke CreateCompatibleDC ,hDC ;Valid DC mov hBackDC,eax invoke SetPixelV ,hBackDC,xPos,yPos,crColor ;Valid cordinates etc For some reason the call to SetPixel does not work, i am 100% certain everything else is fine. The problem is somehow related to the fact that the DC is not on screen: invoke GetDC ,hWnd mov hDC,eax invoke SetPixelV ,hDC,xPos,yPos,crColor This works perfectly, just i dont want the pixels to be regenerated everytime they are hidden. Cause that doesn't work for me. To make sure things were extra-perfectly fine, i checked via GetDeviceCaps ,that the RC_BITBLT flag was set, and it was, meaning that it has gotten me completly confused. :(
Posted on 2001-01-17 02:14:00 by manimal
Do you call ReleaseDC after creating the CompatibleDC ?
Posted on 2001-01-17 11:40:00 by Test Department
hi, um, i'm not sure, but don't you have to create a compatible bitmap too if you want to draw on this new dc? check out CreateCompatibleBitmap for more information or take a look on the sources on my site which use backbuffering, i did the same there as you try to do (i suppose).
Posted on 2001-01-17 12:12:00 by [SaFc0n]
haha, i had a thought, would the fact that a different thread than the one that created the window was making the calls (GetDC, CreateCompatibleDC, SetPixelV, etc) have anything to do with it . . . . . . . . .
Posted on 2001-01-18 05:35:00 by manimal