I defined structs some structs and I get errors that on the left of '->' must be a class/struct/union. I don't know what is the problem because there is a struct on the left side of '->'. Here is my code.
I get errors where I used the info variable.
Any one know what is wrong?Code:struct POINTAPI{long X; long Y;} struct TXTFONT{short Height; short IndentX; short IndentY; short Left; short Top; short Width;} struct HDCINFO{long HDC; long Height; long Width;} struct OUTINFO{TXTFONT Font; HDCINFO HDC; POINTAPI Point; long StrLen;short ScrollX;} [DllImport("gdi32.dll", EntryPoint="TextOutA")] static extern int32 TextOut (long hdc, long x, long y, char * lpString, long nCount); void _stdcall PrintText(char *pText, OUTINFO *info); BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } void _stdcall PrintText(char *pText, OUTINFO *info){ long NextStart, I; bool MoveIt; for(I=0;I<info->StrLen;I++) { if(*pText==(char)10 || *pText == (char)13){info->Point.Y = info->Point.Y + info->Font.Height; info->Point.X = info->Font.IndentX - (info->ScrollX * info->Font.Width); if(info->Point.Y > (info->HDC.HDC-1)){break;} } else { if(info->Point.X > info->Font.IndentX){ if(info->Point.X > (info->HDC.Width-1)){ for( ;I < info->StrLen;I++){ if(*pText == (char)10){break}pText=pText+1;} TextOut(info->HDC.HDC,info->Point.X,info->Point.Y,pText,1); } info->Point.X = info->Point.X + info->Font.Width; pText=pText +1; } } }
Thanx in advance!



LinkBack URL
About LinkBacks


