fail to draw bitmap correctly with Bitblt()
Rer
80
Reputation points
Part of callback function of a child window:
case WM_MOVE:
hdc = GetDC(hChild);
hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, hBitmap2);
BitBlt(hdc, 0, 0, width / 4, height / 4, hdcMem, or_x, or_y, SRCCOPY);
UpdateWindow(hChild);
ReleaseDC(hChild, hdc);
break;
It only paints when it has been initialized but not been redrawn when I move the child window. or_x and or_y is two varibles changing when callback function is called. (And it is tested to be changing indeed)
Windows development | Windows API - Win32
Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
Sign in to answer