about glGetIntegerv()

When I use glGetIntegerv(GL_VIEWPORT, viewport) in OnLButtonDown(UINT nFlags, CPoint point), why don’t I get any information of viewport[].

another question,glRenderMode(GL_RENDER) used in OnLButtonDown(), it always return 0 after selecting operations.

Thank you