#DEFINE SIZE_OF_SPI_GETNONCLIENTMETRICS 340 #DEFINE OFFSET_OF_cbSize 1 #DEFINE SPI_GETNONCLIENTMETRICS 41 * prepare string buffer for structure local lcMyStr lcMyStr = space(SIZE_OF_SPI_GETNONCLIENTMETRICS) * put buffer length into structure lcMyStr = stuff(lcMyStr, OFFSET_OF_cbSize, 4, IntToSTR(SIZE_OF_SPI_GETNONCLIENTMETRICS) ) DECLARE INTEGER SystemParametersInfo IN WIN32API integer nOption, integer n2, string cStruct, integer n2 if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @lcMyStr, 0)>0 * examine result string * values of lfCaptionFont structure should start at the offset 24. * these values are: * lfHeight - 24 * lfWidth - 28 * lfEscapement - 32 * lfOrientation - 36 * lfWeight - 40 * lfItalic - 44 * lfUnderline - 45 * lfStrikeOut - 46 * lfCharSet - 47 * lfOutPrecision - 48 * lfClipPrecision - 49 * lfQuality - 50 * lfPitchAndFamily - 51 * lfFaceName - 52 * note that you need to add 1 to each offset value when working with strings in VFP * the last one is the most interesting - its 32 bytes of Font Face name. So you can take it, for example, by easy way: lcCaptionFont = chrtran(substr(lcMyStr, 53, 32),chr(0),'') llItalic = asc(substr(lcMyStr, 45, 1))>0 && .T. if Italic llBold = strToInt(substr(lcMyStr, 41, 4)) > 500 && .T. if bold * ............ * You may also try to get all other values from string. Just remember that INT takes 4 bytes, byte - is just 1 byte, LOGFONT structure takes 60 bytes in total. endif procedure IntToSTR lparameters pnValue return chr(pnValue % 256) + ; chr(int(pnValue / 256) % 256) + ; chr(int(pnValue / 65536) % 256) + ; chr(int(pnValue / 16777216) % 256 ) procedure STRToInt lparameters pcValue return asc(left(pcValue,1)) + ; asc(substr(pcValue,2,1))*256 + ; asc(substr(pcValue,3,1))*65536 + ; asc(substr(pcValue,4,1))*16777216