>#Define HKCU -2147483647 && HKey_Current_User > >Declare Long RegOpenKey In AdvAPI32 ; > Long hKey, String cSubKey, Long @phkResult > >Declare Long RegQueryValueEx in AdvAPI32 ; > Long hKey, String cValueName, Long lpReserved, ; > Long @nType, String @cData, Long @nDataSize > >Declare Long RegCloseKey In AdvAPI32 Long hKey > >cKey = 'Control Panel\Desktop\WindowMetrics' >nSubKey = 0 >If (RegOpenKey( HKCU, cKey, @nSubKey ) == ERROR_SUCCESS) > ?'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics : ' > > nType = 0 > nDataSize = 260 > cData = space( nDataSize ) > > nError = RegQueryValueEx( nSubKey, 'CaptionFont', 0, ; > @nType, @cData, @nDataSize ) > > If (nError == 234) && more data, not enough buffer > cData = space( nDataSize ) > nError = RegQueryValueEx( nSubKey, 'CaptionFont', 0, ; > @nType, @cData, @nDataSize ) > endif > > If (nError == 0) && success > cFontSize = alltrim(str(asc(left( cData, 1 )))) > cData = substr( cData, 19 ) > cData = left( cData, at(chr(0), cData)-1 ) > ? ' CaptionFont: ' + cData + ', ' + cFontSize > else > ? 'Error# : ', nError > endif > > RegCloseKey( nSubKey ) >endif >>