문제

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