• Advertisement

Archived

This topic is now archived and is closed to further replies.

SetPixelV

This topic is 5956 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

hi, im used to doing graphics with dx, to do graphics, in the WM_PAINT, i just validate the rect, and do my drawing elsewhere. how do i draw with just api? for instance, while(true){ if( PeekMessage(...)) { doevents }else{ gamemain() } } void gamemain() { // how do i set up to draw? setpixelV(...); }

Share this post


Link to post
Share on other sites
Advertisement
Drawing in the WindowsAPI is real easy. You just need to get a DC and then feed the DC and your pixel coords to the SetPixel functions.

Getting a DC is kinda strange though. If you are in your WM_PAINT function, use BeginPaint. It returns a DC and endpaint releases it. If you are outside the WM_PAINT use GetDC() and ReleaseDC().

Take a look at your help files for the drawing commands. GDI supports LOTS of cool drawing stuff. It''s just painfully slow.

Landsknecht
"For Gold or Glory, but Never For Free!"

Share this post


Link to post
Share on other sites

  • Advertisement