字体大小和屏幕上坐标转换的问题,求教.

tghost333 2005-08-27 09:59:22
比如说字体大小是-11,有十个字符,它在屏幕上所占的范围的高和宽是多少?其它字体呢?有没有一个换算的公式?
...全文
218 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
husl 2005-08-28
  • 打赏
  • 举报
回复
CSize GetTextExtent( LPCTSTR lpszString, int nCount ) const;

CSize GetTextExtent( const CString& str ) const;
guosenjuncs 2005-08-28
  • 打赏
  • 举报
回复
在VisualC++6.0技术内幕的字体这一章有公式,你查查
菜牛 2005-08-28
  • 打赏
  • 举报
回复
GetTextExtentPoint32

Requirements
Windows NT/2000/XP: Included in Windows NT 3.5 and later.
Windows 95/98/Me: Included in Windows 95 and later.

tghost333 2005-08-28
  • 打赏
  • 举报
回复
呵呵,再问问,在win95、win98、win2000下用的函数一样吗?
菜牛 2005-08-28
  • 打赏
  • 举报
回复
用GetTextExtentPoint32函数来计算
tghost333 2005-08-27
  • 打赏
  • 举报
回复
如果是unicode的呢?
nelsonc 2005-08-27
  • 打赏
  • 举报
回复
用GetTextExtentPoint函数来计算。
tghost333 2005-08-27
  • 打赏
  • 举报
回复
自己顶一下.

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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