如何获取标题栏的高度?

六道佩恩 2019-08-14 05:02:18
GetSystemMetrics( SM_CYCAPTION ) 结果为23,但怎么看标题栏都有30左右的高度,请问是怎么回事?
...全文
200 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2019-08-16
  • 打赏
  • 举报
回复
我就说这个问题还能难倒我?
赵4老师 2019-08-15
  • 打赏
  • 举报
回复
cxsizeframe+titlebarheight+cxborder+edgewidth
六道佩恩 2019-08-14
  • 打赏
  • 举报
回复
引用 1 楼 赵4老师 的回复:
仅供参考:
            titlebarheight = win32api.GetSystemMetrics(win32con.SM_CYSIZE)
            edgewidth = win32api.GetSystemMetrics(win32con.SM_CXEDGE)
            cxborder = win32api.GetSystemMetrics(win32con.SM_CXBORDER)
            cxsizeframe = win32api.GetSystemMetrics(win32con.SM_CXSIZEFRAME)
#           print(titlebarheight,edgewidth,cxborder,cxsizeframe)
            cx=left+cxsizeframe+edgewidth
            cy=top+cxsizeframe+titlebarheight+cxborder+edgewidth+3
SM_CYSIZE得出来的是22。。。也不符合
赵4老师 2019-08-14
  • 打赏
  • 举报
回复
仅供参考:
            titlebarheight = win32api.GetSystemMetrics(win32con.SM_CYSIZE)
            edgewidth = win32api.GetSystemMetrics(win32con.SM_CXEDGE)
            cxborder = win32api.GetSystemMetrics(win32con.SM_CXBORDER)
            cxsizeframe = win32api.GetSystemMetrics(win32con.SM_CXSIZEFRAME)
#           print(titlebarheight,edgewidth,cxborder,cxsizeframe)
            cx=left+cxsizeframe+edgewidth
            cy=top+cxsizeframe+titlebarheight+cxborder+edgewidth+3

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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