_Alex
May 25th, 1999, 06:03 AM
I want so that my programm can install(uninstall) new font in Windows. How I can do it?
|
Click to See Complete Forum and Search --> : Font instalation !!! _Alex May 25th, 1999, 06:03 AM I want so that my programm can install(uninstall) new font in Windows. How I can do it? bimmer boy July 28th, 1999, 11:10 AM i'm under the impression that you can just copy it to the fonts directory (which is listed in the shell as a special folder) and all should be well...correct me if i'm wrong. miked Todd Jeffreys July 28th, 1999, 11:21 AM Once the copy is complete, make a call to AddFontResource. It doesn't have to be in the fonts folder for that call to work though bimmer boy July 28th, 1999, 12:46 PM slight problem with that function -- quoting the MSDN: This function installs the font only for the current session. When the system reboots, the font will not be present. To have the font installed even after rebooting the system, the font must be listed in the registry. miked Todd Jeffreys July 28th, 1999, 12:56 PM I have Jan 99 edition of MSDN and I don't see that. While it's true that AddFontResource only lasts for a session, the font must be in the FONTS directory for it to be loaded at startup, not the registry. bimmer boy July 28th, 1999, 12:57 PM the MSDN i got that out of was the April 99 version...don't know if things have changed or not. miked ranjit July 29th, 1999, 12:14 PM Well the font file has to be in windows\fonts directory if the font has to be permanently installed on the system .I just tried it out and it does not stay if the font was outside this directory. But how do i tell the applications running about the change in the font Todd Jeffreys July 29th, 1999, 12:17 PM From MSDN - Any application that adds or removes fonts from the system font table should notify other windows of the change by sending a WM_FONTCHANGE message to all top-level windows in the operating system. The application should send this message by calling the SendMessage function and setting the hwnd parameter to HWND_BROADCAST. When an application no longer needs a font resource that it loaded by calling the AddFontResource function, it must remove that resource by calling the RemoveFontResource function. ranjit July 29th, 1999, 12:20 PM WELL the font has to be in the windows\fonts directory if it has to work ie stay permanent or the font gets uninstalled once windows is shut down ,i just tried it out .How to inform the other progs running of the font change . The prev reply was to the wrong message sorry for the double replies bimmer boy July 29th, 1999, 12:36 PM according to the msdn this is how you notify the other windows: Any application that adds or removes fonts from the system font table should notify other windows of the change by sending a WM_FONTCHANGE message to all top-level windows in the operating system. The application should send this message by calling the SendMessage function and setting the hwnd parameter to HWND_BROADCAST. miked codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |