우리는 비슷한 문제가있었습니다. 우리는 WM_VSCROLL을 얻었을 때 상위 윈도우의 영역을 무효화시켜 업데이트하도록했습니다. 사용자 demorge 여기에서 말하는 것처럼 내가하려고 노력 :
SetBkMode(hdc, TRANSPARENT) doesn't work
을하지만 핸들을 사용하지 않는 우리의 코드는, 우리가 실제로 클래스하여 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;
...
}
물론 나는 그것을 조금 일반화해야했습니다. 그저 네가 네 문제를보고있는 다른 사람들이 있다는 것을 알기를 바랐다. 문제를 해결하는 방법을 찾았다.
효과가없는 자동 HScroll을 제외하고 모든 것이 이미 제안 된대로 설정되었습니다. – CodeFusionMobile