Jump to content
  • Advertisement
Sign in to follow this  
squirrel_of_death

help with HWND DC BitBlt

This topic is 4796 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 there. I am trying to get the move-screen refresh working, using DCs and GDI, but no success, due to a single problem, which is getting a window control ( such as an edit field, or button ) to draw into a temp DC, before BitBlt'ing the final product in one go at the end. Here's what I do ( for the edit field for example ) HDC tempDC = GetDC(m_hWndName); BitBlt(m_hDCBuffer, NAME_X, NAME_Y, NAME_WIDTH, NAME_HEIGHT, tempDC, 0, 0, SRCCOPY); DCBuffer is then sent to the calling draw() function, which BitBlt's this DC to the screen, which works a treat for all the GDI stuff. But something really weird happens with my edit field, and I don't know why. It kind of drifts up and to the left whenever the window is dragged 'into' the screen, ie when it tries this refresh. It's really weird. So I guess I am doing something wrong with the DC for the edit window. The edit window by the way is a regular HWND, classed as TEXT("EDIT"). Help please :( *edit* the constants are the dimensions of the edit window, and do not change.

Share this post


Link to post
Share on other sites
Advertisement
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!