Maximize-problem

Sometimes happens in my application, that
after on MAXIMIZE will be not rendered whole scene, on the right side and on the bottom is an area, that blends out my object - the rendering area is smaller than screen area.(it seems to me that the glViewport function does not work properly). The same thing happens also when I`m resizing the window
(to be greather). WHERE IT CAN BE? (Maybe I do some mistake in OnSize procedure?).
I do use the VC++ 6.0 and NO GLUT Windows procedures. Thanx.