문제

I want to treat WM_PAINT message. But at first, I want to let system to do the default drawing, then I draw something else manually.

For example:

    case WM_PAINT:
        CallWindowProc(DefWndProcTabControl, hwnd, message, wParam, lParam);
        TabControlOnPaint(hwnd);
        return 0;

This works, but is not very good, since it flicks.

One possibility is to make the default drawing done in a memory DC. But I don't know how to do this if I use CallWindowProc(DefWndProcTabControl...).

Any suggestion for this?

도움이 되었습니까?

해결책

If the window you're painting supports it, use WM_PRINT or WM_PRINTCLIENT to do the default painting into a memory DC.

(Trying to do that via CallWindowProc is unlikely to work.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top