how to show text on screen?

i am using MFC(SDI) with Opengl, i tried to show text on screen using:

glRasterPos2i(200, 400);
FontPrintf(Font, -1, “Testing Opengl”);


and i get compilation error:
‘FontPrintf’ : undeclared identifier
‘Font’ : undeclared identifier

any soluton?

You need to link with the library or source file(s) that defines that function and whatever Font may be, and they are not related to OpenGL. The place where you got that piece of code would be a good place to start.

Checl on my website, I’ve a simple example for you.