Jump to content
  • Advertisement

Archived

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

moronmaster

drawing outside of the window

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

Hmm... i am trying to display a bitmap image and heres what i get http://www.geocities.com/moronmaster/example.bmp (dunno how to post images so heres a link.) Looks like because i am Blt''ing to coordinates 0,0 thats why. Now i move the position of the window and Blt some more http://www.geocities.com/moronmaster/example2.bmp Hey! I just Blt''ed out of my program window. Further investigation leads me to surmise that i set my clipper to 0,0,640,480 so even if i moved the window i can still Blt to position 0,0 cause the clipper hasn''t moved. So now a coupla questions: - Is it possible to like use relative coordinates. Meaning if i Blt to 0,0 it Blt''s to the top of the window, not the top of the screen. - How do i make sure my clipper follows wherever my window goes? Or do i have to keep updating the clipper area everytime i get WM_MOVE message? I was thinking i could solve this issues by keeping some global variables that track the position and area that the window is currently occupying. So everytime i displayed something i use these variables to determine the top of the window and work from there. Is there a better way to do this?

Share this post


Link to post
Share on other sites
Advertisement
hi

you may want to look in to:

GetClientRect, and ClientToScreen

Then when you blit to your window you can blit the primary surface to the correct window coords (even stretch to window size).

Just go about your blitting normally to the primary surface using relative coords.

Hope that helps


[ Hazard Ball Demo | Genaside Website ]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!