英语翻译//对否WM_SETFONTAn application sends a WM_SETFONT message

英语翻译//对否
WM_SETFONT
An application sends a WM_SETFONT message to specify the font that a control is to use when drawing text.
To send this message, call the SendMessage function with the following parameters.
一个应用程序发送一个WM_SETFONT消息到在绘制文本控制使用指定的字体.发送这个消息,调用SendMessage函数
与其参数上.
Handle to the font. If this parameter is NULL, the control uses the default system font to draw text.
字体句柄,如果,这个参数是NULL,这个管理会使用缺省的系统字体绘制文本
The low-order word of lParam specifies whether the control should be redrawn immediately upon setting the font.
If this parameter is TRUE, the control redraws itself.
这个lParam的低字节指定是否这个管理应该立即重绘在设置这个字体.如过,这个参数是ture,这个管理重绘它本身.
The WM_SETFONT message applies to all controls, not just those in dialog boxes.
这个WM_SETONT消息申请所有的管理,不是那些对话框.
The best time for the owner of a dialog box control to set the font of the control is when it receives the WM_INITDIALOG message.
The application should call the DeleteObject function to delete the font when it is no longer needed;
for example, after it destroys the control.
这个最好的时间用户的对话框管理设置这个管理字体当它接受WM_INTIDIALOG消息
这个应用程序在不太需要的时候应该调用这个DeleteObject函数删除这个字体;例如,之后销毁这个管理.
The size of the control does not change as a result of receiving this message.
To avoid clipping text that does not fit within the boundaries of the control,
the application should correct the size of the control window before it sets the font.
作为一个返回值接受这个消息,这个管理的大小不能改变,避免剪辑文本不能在内部安装这个管理的边界.
这个应用程序必须在设置字体之前更改这个管理的窗口的大小
When a dialog box uses the DS_SETFONT style to set the text in its controls,
the system sends the WM_SETFONT message to the dialog box procedure before it creates the controls.
An application can create a dialog box that contains the DS_SETFONT style by calling any of the following functions:
当一个对话框使用这个DS_SETFONT风格设置这个文本在它的管理,在它创建这个管理这个系统发送一个WM_SETFONT消息到这个对话框程序.
一个应用程序能创建一个对话框包含这个DS_SETFONT风格调用一些下面的函数:
jfq9010 1年前 已收到1个回答 举报

phewscat 幼苗

共回答了19个问题采纳率:84.2% 举报

应用程序发送一个WM_SETFONT消息,用来指定控件绘制文本所使用的字体.发送这个消息需要调用SendMessage函数,其参数如下.
字体句柄,如果,这个参数是NULL,这个控件会使用默认的系统字体绘制文本
lParam的低字节指定在设置字体后,是否应该立即重绘这个控件.如果这个参数是true,控件重绘自己.
WM_SETONT消息适用于所有的控件,不仅仅是那些对话框控件.
对话框控件的所有者给控件设置字体的最佳时机是当它收到WM_INITDIALOG消息时.
应用程序不再需要使用此字体的时候,应该调用个DeleteObject函数删除这个字体;例如,在它清除了此控件后.
接收消息的结果不会改变控件的大小.为避免文字不能安置在控件边界之内而出现剪辑文本的现象,应用程序在设置字体前应该修正控件窗口的大小.
当一个对话框使用DS_SETFONT风格设置控件的文本时,在创建控件前,系统会发送一个SETFONT 消息.应用程序会通过调用下面任意一个函数来创建一个包含 DS_SETFONT 风格的对话框:

1年前

9
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.014 s. - webmaster@yulucn.com