CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  基础类

请问如何能够得到窗体的宽度和高度?

楼主vc666(vc666)2002-01-22 17:30:54 在 VC/MFC / 基础类 提问

请问如何能够得到窗体的宽度和高度? 问题点数:5、回复次数:3Top

1 楼liu_feng_fly(笑看风云 搏击苍穹 衔日月)回复于 2002-01-22 17:33:55 得分 5

GetWindowRect  
  This   function   retrieves   the   dimensions   of   the   bounding   rectangle   of   the   specified   window.   The   dimensions   are   given   in   screen   coordinates   that   are   relative   to   the   upper-left   corner   of   the   screen.    
   
  BOOL   GetWindowRect(    
  HWND   hWnd,    
  LPRECT   lpRect   );    
  Parameters  
  hWnd    
  Handle   to   the   window.    
  lpRect    
  Long   pointer   to   a   RECT   structure   that   receives   the   screen   coordinates   of   the   upper-left   and   lower-right   corners   of   the   window.    
  Return   Values  
  Nonzero   indicates   success.   Zero   indicates   failure.   To   get   extended   error   information,   call   GetLastError.  
   
  这样就可以得到宽度和高度了Top

2 楼vc666(vc666)回复于 2002-01-22 17:42:49 得分 0

u------pTop

3 楼vc666(vc666)回复于 2002-02-06 11:23:39 得分 0

geifenTop

相关问题

  • 怎么规定窗体的最小宽度与高度?
  • 怎么设置一个窗体的最小宽度和高度?
  • 解决了马上给分,怎样获得子窗体的高度和宽度?
  • 窗体的宽度问题
  • 用哪个API函数可以实现窗体高度不变,而宽度可变?
  • 请问怎样得到一幅图片高度,宽度?
  • 怎样得到Listview的ListItem的高度,和宽度?
  • 怎么得到另一应用程序的高度与宽度?
  • 如何得到图片的宽度与高度?
  • [求助]请问如何得到window的高度和宽度????

关键词

  • lprect
  • 请问如何
  • 能够得到窗体
  • corners
  • 宽度和高度
  • dimensions
  • screen coordinates
  • upper
  • indicates
  • hwnd

得分解答快速导航

  • 帖主:vc666
  • liu_feng_fly

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo