Link to home
Start Free TrialLog in
Avatar of inampudi1
inampudi1

asked on

How to change a pixel color with out using SetPixel() function

Hi,
        How can I change the Pixel color of our window DC with out using the function SetPixel() function
in Vc++, I am searching for a method for getting the direct pointer address of our window DC location.
So I can change the RGB value using memory address (Pointer)
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inampudi1
inampudi1

ASKER

Hi experts,
                      can We create a DIB which will automatically refresh to the DC with out calling BitBlt or StretchBlt etc like functions . Because i want a very fast method. Is BitBlt() copy the entire image to the DC or Just set The pointer.Or is there any method to directly set out DIB pointer to our Window DC.
Hi again,

no, IMO you can't do anything else than blitting the bitmap to the real DC (at least not in Windows GDI) - the problem simply is you would need to have access to the graphics-card's memory which is blocked - the only way to achive such things would be to use DirectX/DirectDraw. Anyway, how fast do you want to have it? BitBlt isn't such slow - for example I once wrote a bitmap roation test program which managed to rotate and paint a 800x600 pixel image on a 2,4 GHz machine with about 160 fps.

BitBlt copies the image (or a part of it) to the real DC ...

ZOPPO
HI Zoppo,
                     Your Guidance is Good, it is well cleared..
And it is very helpfull to me...
That's fine, I'm glad I could help ...

Have a nice day,

best regards,

ZOPPO