Sign in to follow this  
squirrel_of_death

help with HWND DC BitBlt

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this