質問

My Win32 application has to load a custom font file from ProgramFiles folder. Is it possible to load a custom font file from custom location? If so how can I load a custom font file?

Please suggest.

Thanks,

役に立ちましたか?

解決

Use AddFontResource or AddFontResourceEx

Note:

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. This function installs the font only for the current session. When the system restarts, the font will not be present. To have the font installed even after restarting the system, the font must be listed in the registry.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top