I had to visually improve an old MFC application which worked fine in the old layout.
Now with the new layout artifacts (highlighted in the picture below) can occur if another window is moved in the foreground of this application.
Even if my application gets back the focus it does not repaint properly.
The main windows is a CFrameWnd
with style WS_OVERLAPPEDWINDOW
and contains other elements like CWnd
and CDialogBar
.
I had to override the default behavior at some point (OnNcPaint
, OnActivate
, OnPaint
) to achieve the specifications.
If I switch back to the ugly old layout, the drawing is faultless. But there are so many parts changed that I couldn't find the one difference that causes this issue. Hopefully you can name a possible reason.
I'm glad to assist you with more specific information if needed.