FoxPro/Visual FoxPro - Instalar font automaticamente?

 
Vista:

Instalar font automaticamente?

Publicado por Sergio (89 intervenciones) el 16/03/2005 09:21:30
Hola foxeros, he hecho impresiones con letras que no son muy comunes en los ordenadores y querría que cuando se instalara el programa, éste la instalara automaticamente pero no sé.

¿Cómo se podría instalar directamente una fuente en cualquier sistema de windows?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Instalar font automaticamente?

Publicado por David Amador T. (5 intervenciones) el 16/03/2005 11:28:01
Si utilizas un generador de instaladores, es seguro que lo hace ... InstallShield lo hace ... Sino puedes hacerlo por código desde VFP utilizando el API de Windows...

AddFontResource y RemoveFontResource
http://www.davphantom.net/consultar.asp?id=81&op=2

David Amador Tapia
WebMaster "La Web de Davphantom"
www.davphantom.net
Cartagena. Colombia
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Instalar font automaticamente?

Publicado por Sergio (89 intervenciones) el 16/03/2005 13:05:32
No me funciona y lo pongo todo igual. Me devuelve ".T." pero la fuente sigue sin estar instalada. ¿he de hacer algo diferente?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Instalar font automaticamente?

Publicado por David Amador T. (520 intervenciones) el 16/03/2005 14:38:01
Pruebalo así ...

llSucess = InstallSystemFont("path\filename.TTF")

PROCEDURE InstallSystemFont()
LPARAMETERS lcFontLocFile
LOCAL lnNumFontsAdded

DECLARE INTEGER AddFontResource IN GDI32.DLL ;
STRING @ lpszFileName
DECLARE INTEGER SendMessage IN USER32.DLL ;
INTEGER hWnd, ;
INTEGER Msg, ;
INTEGER wParameter, ;
INTEGER lParameter
#DEFINE HWND_BROADCAST 0xFFFF
#DEFINE WM_FONTCHANGE 0x001D

lnNumFontsAdded=AddFontResource(lcFontLocFile)
IF lnNumFontsAdded > 0
*\\Font added sucessfully, send notification to Windows so apps get updated
=SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0)
RETURN .T.
ELSE
*\\Unable to add font
RETURN .F.
ENDIF
ENDPROC

David Amador Tapia
WebMaster "La Web de Davphantom"
www.davphantom.net
Cartagena. Colombia
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar