I have some code that draws a bitmap at 0,0 and an edit box that you can input a number to determine the bitmap's position. It's like this:
void DrawPieces(HDC hdcWindow)
{
ErasePieces(hdcWindow);
HDC hdcMemory;
hdcMemory = CreateCompatibleDC(hdcWindow);
SelectObject(hdcMemory, XMask);
BitBlt(hdcWindow, xpos, 20, bmXPiece.bmWidth, bmXPiece.bmHeight, hdcMemory, 0, 0, SRCAND);
SelectObject(hdcMemory, XPiece);
BitBlt(hdcWindow, xpos, 20, bmXPiece.bmWidth, bmXPiece.bmHeight, hdcMemory, 0, 0, SRCPAINT);
DeleteDC(hdcMemory);
}
which is called from the WM_PAINT command. It draws it fine, but when I update the variable it doesn't redraw it in a new location. I used the the EN_UPDATE thing on the edit control so it does update the var, and sends it, but the image stays in the same place. How do I make it draw at a different location? Thanks a lot.



LinkBack URL
About LinkBacks


