Написал я инициализацию шрифта с WINAPI CreateFont в XP на Visual C. А он в XP, W2000 пашет а на W98 не хочет. GetLastError возращает 120.
MFC не катит. Help me!
P.S. gl — функции не причём.
GLvoid BuildFont(GLvoid) // Build Our Bitmap Font
{
hDC=GetDC(hWnd);
HFONT font; // Windows Font ID
base = glGenLists(256+10); // Storage For 256 Characters
if( (base==GL_INVALID_VALUE)||(base==GL_INVALID_OPERATION)||(base==0) ) {printf("base errror==0"); getchar();}
font = ::CreateFont(
-12, // Height Of Font
10, // Width Of Font
0, // Angle Of Escapement
0, // Orientation Angle
200,//FW_BOLD, // Font Weight
FALSE, // Italic
FALSE, // Underline
FALSE, // Strikeout
DEFAULT_CHARSET, //ANSI_CHARSET, // Character Set Identifier
OUT_TT_PRECIS,//OUT_DEFAULT_PRECIS // Output Precision
CLIP_DEFAULT_PRECIS, // Clipping Precision
ANTIALIASED_QUALITY,//DEFAULT_QUALITY// Output Quality
FF_SWISS|DEFAULT_PITCH, // Family And Pitch
"Arial"); // Font Name
UINT error=0;
error=GetLastError();
printf("font==%i GetLastError==%u",font, error);
if( SelectObject(hDC, font)==NULL) {printf("font==00"); getchar();} // Selects The Font We Created
if( wglUseFontOutlines(hDC, // Select The Current DC
0, // Starting Character
255+10, // Number Of Display Lists To Build
base, // Starting Display Lists
0.0f, // Deviation From The True Outlines
0.2f, // Font Thickness In The Z Direction
WGL_FONT_POLYGONS, // Use Polygons, Not Lines
gmf)==FALSE ) // Address Of Buffer To Recieve Data
{printf("font==0"); getchar();}
}