VS中使用SS_CENTERIMAGE或Center Image让文本垂直居中。
在VC6中,如下地方设置:
反映在rc文件中,多了一个属性:
LTEXT “Static Text”,IDC_STATIC_ID,42,26,104,8, SS_CENTERIMAGE
得到这个属性的名称(Center Image)之后,就清楚在VS2010或类似版本中对应的地方。如下:
属性框中给出的解释:
MSDN的解释:
SS_CENTERIMAGE Specifies that, if the bitmap or icon is smaller than the client area of the static control, the rest of the client area is filled with the color of the pixel in the top left corner of the bitmap or icon. If the static control contains a single line of text, the text is centered vertically in the client area of the control.