Jump to content
  • Advertisement
Sign in to follow this  
pbbm2000

SetPixel

This topic is 4024 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to use SetPixel() on another window. It works fine if the pixel is on the right 1/3 or left 1/3 of the window but of the pixel is in the middle 1/3 of the window it doesn't work. The really strange thing is that GetPixel() works for the entire window. Any help would be great, thanks.

Share this post


Link to post
Share on other sites
Advertisement
SetPixel() isn't a standard C++ function. If you're using C++, which SetPixel() are you using? And if you're not using C++, which language is it?

Share this post


Link to post
Share on other sites
Sounds like clipping rectangle problem.

But lacking code, OS, windowing system, it's a bit hard to say anything more useful.

Share this post


Link to post
Share on other sites
Would this be the Windows GDI function? clicky

I don't know what would cause your problem however the documentation says the function returns the colour of the set pixel if it succeeds or else 1 if it fails so you might want to test to see what's going on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!