opengl initialization for the Multiple document interface

Using windows API to create a MDI application. I deliberately render opengl scene in one of the child window. However ,it seems that i have to manually resize the window by mouse to activate the opengl rendering.

Sounds like you aren’t calling your resize function during initialization, so your OpenGL RC has no idea what coordinates it is using, etc.

Thanx a lot friend,i have solved my problem,Even i have multi-windows for displaying OpenGL .and i use wglMakeCurrent before rendering every single window. Even with that ,i must use wglMakeCurrent at the time of creating GL window.