c++ - 从应用程序特定文件夹加载自定义字体文件

标签 c++ visual-c++ mfc win32gui

我的 Win32 应用程序必须从 ProgramFiles 文件夹加载自定义字体文件。 是否可以从自定义位置加载自定义字体文件? 如果是这样,我如何加载自定义字体文件?

请提出建议。

谢谢

最佳答案

使用AddFontResourceAddFontResourceEx

注意:

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.

关于c++ - 从应用程序特定文件夹加载自定义字体文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20568167/

相关文章:

c++ - 系统错误 : error return without exception set

c++ - 使用水平滚动条手动设置 MFC CComboBox 下拉高度

c++ - MFC 中的拼写检查

c# - 在 Windows 7 中使用 VC++ 和 C# 中的 MemoryMappedFiles 或命名管道进行进程间通信

c++ - __declspec(dllimport) 导致编译器在 MSVC 2010 上崩溃

c++ - 有没有更好的方法来选择正确的方法重载?

c++ - 如何在 C++ 中启用共享打开的文件?

c++ - 在 C++ 中创建一个集合<char>

c++ - 在 C 中将 char 转换为 int

visual-c++ - 如何中止使用 wininet 发送的请求?