>>You can use an Install utility like InstallShield to install your fonts used by you application but the user can then remove the font you install.
>>
>>How can I reinstall the fonts from FoxPro for Win95 and Win98?
>>I am working on this right now. Any one already has done this?
>
>Hi Jean-Rene,
>
>Unfortunately, the only practical way to re-install the fonts is through the Control Panel's Font Manager. Utilizing the API to do this is not practical, and may not be possible.
George, You are right.
After doing more research on the subject we now do it with a C++ function we done. We call this function from VFP after the fonts are copied in the Fonts Dir.
The function will register the Fonts for WinNT only because we found that coping the font in the fonts dir. is all me need for Win95/98.
A draft of the function in C++ for WinNT
#include
#include
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow )
{
HKEY hKey;
RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Fonts", &hKey);
RegSetValueEx( hKey, "FoxFont 7,9", 0, REG_SZ, "FoxFont.fon", 11 );
RegCloseKey( hKey );
AddFontResource("FoxFont.fon");
RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows
NT\\CurrentVersion\\Fonts", &hKey);
RegSetValueEx( hKey, "FoxPrint (TrueType)", 0, REG_SZ, "FoxPrint.ttf", 12 );
RegCloseKey( hKey );
AddFontResource("FoxPrint.ttf");