Hi,

After closing the dialog try to invalidate the main window. Look at CWnd::InvalidateRect or SDK
Code:
BOOL InvalidateRect(
  HWND hWnd,           // handle to window
  CONST RECT* lpRect,  // rectangle coordinates
  BOOL bErase          // erase state
);