A problem about Rendeing the sense

when I use the OpenGL to render the sense I face a problem that when I resize or reactive the window, the sense are lost.
I had reload the function of CView::OnSize and CView::OnEraseBkgnd.
what should I do or what function should I append or revise?