菜鸟寒号(嚎):还有这段,能看懂翻译,不能理解,为无差别,给原文

超级管理员9527 2003-09-18 01:34:47
Because the default font that Windows uses for list boxes is proportionally spaced, it is virtually impossible to line up columns of information in a list box by separating them with space characters. One way to create a columnar list box display is to use SetFont to apply a fixed-pitch font to the list box. A better solution is to assign the list box the style LBS_USETABSTOPS and separate columns of information with tab characters. An LBS_USETABSTOPS list box treats tab characters the way a word processor does, automatically advancing to the next tab stop when a tab character is encountered. By default, tab stops are evenly spaced about eight character widths apart. You can change the default tab stop settings with the CListBox::SetTabStops function. SetTabStops measures distances in dialog units. One dialog unit is approximately equal to one-fourth the width of a character in the system font.
...全文
56 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
已经结贴,可是这里我看不见分,进管理,分又给了,不知道怎么回事。没得到分的给个消息,我去问斑竹
dzqsuper 2003-09-19
  • 打赏
  • 举报
回复
俺没有得到分
wangbab 2003-09-18
  • 打赏
  • 举报
回复
我试试,我的E问也不好。翻译的不好请不要骂。

因为windows在ListBox中的默认字体是有一定的空间,因此你不能用添加空格的办法整齐的排列ListBox的列。
解决办法一:用SetFont设定ListBox的填充字体。
更好的办法:修改ListBox的样式为LBS_USETABSTOPS,用制表符(Tab)分隔每列。样式为LBS_USETABSTOPS的ListBox把制表符(Tab)当作一个单词处理。默认情况下,制表符占用8个字符空间。可以用CListBox::SetTabStops设置制表符的宽度。SetTopStops设置的宽度以Dialog uint(我的理解是对话框的像素)作为单位。一个Dialog uint大约等于系统字体字符的1/4宽。

我的水平不高,希望能对楼主有帮助。
xiaoliuzi 2003-09-18
  • 打赏
  • 举报
回复
不好意思,我也没看太懂也。
bluebohe 2003-09-18
  • 打赏
  • 举报
回复
不好意思,英语没过四级,一见到英文就头疼:(
dzqsuper 2003-09-18
  • 打赏
  • 举报
回复
由于windows在list box中用的default字体是适当的空间,所以事实上在list box它是不可能


楼主你也真懒,这个应该是不难的,你的文化水平是多少哦
我这个小学三年级的都能理解上面的意思

如果你是大学生,就不要再丢当代中国大学生的脸了,这要是让那个老外看到了,多不好哦
还是快点结贴吧
flinming 2003-09-18
  • 打赏
  • 举报
回复
真够懒的,楼主。。呵呵。。。。

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧