简体   繁体   English

如何设置Cpropertysheet的字体?

[英]how to set the font for Cpropertysheet?

默认情况下,CPropertysheet使用“系统字体”,它会以非英语语言创建问题,因此希望将字体的显示方式设置为与所有语言兼容。

CPropertySheet is derived from CWnd, so it has a SetFont member function. CPropertySheet派生自CWnd,因此它具有SetFont成员函数。 Have you tried that? 你有尝试过吗?

When using SetFont it is necessary to make the CFont object a member variable so it will live as long as the window. 使用SetFont时,必须使CFont对象成为成员变量,以便它与窗口一样长。

Which text are you trying to change? 您要更改哪些文字? The text on the tabs is displayed by a tab control which is an embedded member of CPropertySheet. 选项卡上的文本由选项卡控件显示,该控件是CPropertySheet的嵌入式成员。 So the solution may be that you need to call SetFont on the tab control. 因此,解决方案可能是您需要在选项卡控件上调用SetFont。 CPropertySheet::GetTabControl can be used to give you access to the control, as shown in this example: CPropertySheet :: GetTabControl可用于使您访问该控件,如以下示例所示:

http://msdn.microsoft.com/en-us/library/dftahdhz.aspx http://msdn.microsoft.com/en-us/library/dftahdhz.aspx

Look at these resources: 查看以下资源:

MFC contains bug in _AfxChangePropPageFont() and AfxGetPropSheetFont() methods. MFC _AfxChangePropPageFont()AfxGetPropSheetFont()方法中包含错误。 It has been fixed for Japanese but not Chinese. 它已针对日语而不是中文进行了修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM