首页
社区
课程
招聘
已知窗体的句柄,如何获得窗体的width&height in pixels
2006-6-19 22:27 4369

已知窗体的句柄,如何获得窗体的width&height in pixels

2006-6-19 22:27
4369
收藏
免费 0
打赏
分享
最新回复 (4)
雪    币: 236
活跃值: (26)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
红火蚁 3 2006-6-19 22:41
2
0
BOOL GetWindowRect(
  HWND hWnd,      // handle to window
  LPRECT lpRect   // address of structure for window coordinates
);
雪    币: 221
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
vlit 2006-6-19 22:56
3
0
bottom-top?
right-left?
这个宽度和高度包括标题栏吗?
雪    币: 236
活跃值: (26)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
红火蚁 3 2006-6-19 22:59
4
0
如果你想得到客户区的大小就用
BOOL GetClientRect(
  HWND hWnd,      // handle to window
  LPRECT lpRect   // address of structure for client coordinates
);
这个没有那些标题蓝和工具蓝的

如果想包括他们
就用
BOOL GetWindowRect(
  HWND hWnd,      // handle to window
  LPRECT lpRect   // address of structure for window coordinates
);
雪    币: 221
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
vlit 2006-6-19 23:02
5
0
thx!
游客
登录 | 注册 方可回帖
返回