У нас была похожая проблема.В итоге нам пришлось сделать недействительной область родительского окна, чтобы оно обновлялось при получении WM_VSCROLL.Я пытался сделать так, как говорит пользователь demorge:
SetBkMode (hdc, TRANSPARENT) не работает
Но наш код не использует дескрипторы, мы на самом деле используемкласс CWnd, поэтому мы в итоге сделали это в WindowProc:
switch(message)
{
...
case WM_VSCROLL:
case WM_HSCROLL:
LRESULT answer;
PAINTSTRUCT ps;
CDC* pdc;
CWnd* MyParentHWnd;
// We want the scroll to work the same way it has always worked for our
// ancestor class. Let them handle the scrolling and save off their
// return.
answer = AncestorClass::WindowProc(message, wParam, lParam);
pdc = BeginPaint(&ps);
// DO NOT change the assignement operator in the conditional below to an
// equality operator. We are actually trying to get the parent window and
// and storing locally, and then verifying that we didn't get back null.
// This is a purposeful design decision.
if (MyParentHWnd = GetParent()){
RECT MyRect;
GetClientRect(&MyRect);
ClientToScreen(&MyRect);
MyParentHWnd->ScreenToClient(&MyRect);
MyParentHWnd->InvalidateRect(&MyRect);
}
EndPaint(&ps);
return answer;
break;
...
}
Конечно, мне пришлось его немного обобщить.Я просто хотел, чтобы вы знали, что да, есть другие люди, которые видят вашу проблему, и мы нашли, как ее исправить.