Nous avions un problème similaire. Nous avons fini par devoir invalider la région de la fenêtre parent pour l'amener à mettre à jour quand nous avons WM_VSCROLL. J'ai essayé de faire comme Demorge utilisateur dit ici:
SetBkMode(hdc, TRANSPARENT) doesn't work
Mais notre code ne pas utiliser les poignées, nous utilisons en fait la classe CWnd, donc nous avons fini par faire cela dans le WindowProc à la place:
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;
...
}
Bien sûr, j'ai dû le généraliser un peu. Je voulais juste que vous sachiez que oui, il y a d'autres personnes qui voient votre problème, et nous avons trouvé comment le réparer.
Tout est déjà configuré comme vous l'avez suggéré sauf auto HScroll, qui n'a eu aucun effet. – CodeFusionMobile