my first program is a crash

I am new to opengl programming and my first program keeps crashing here -
I have already created a context and made it current.
Commenting this line creates another crash in glFlush().

Please help…

Was your context creation successful? Soudns like you don’t have a valid context to me…

try - many excellent tutorials there.

Well, wglMakeCurrent() had returned a TRUE. So, I don’t think the contexts are invalid.