Advertisement Jump to content
Sign in to follow this  

help with HWND DC BitBlt

This topic is 4952 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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!