GetWindowRect函数里的Rect要什么头文件

tx183584 2011-07-30 05:34:53
我是在纯win32下编的, 不是MFC
...全文
890 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
我才是心翼 2011-07-30
  • 打赏
  • 举报
回复
CRect
upc_xiaowei 2011-07-30
  • 打赏
  • 举报
回复
#include "stdafx.h"//嘿嘿
#include "resource.h"//资源
RECT rt;
GetClientRect(hWnd, &rt);
这样用没错把
Eleven 2011-07-30
  • 打赏
  • 举报
回复
你的Rect是什么类型?RECT 吗?
stjay 2011-07-30
  • 打赏
  • 举报
回复
全大写 RECT
wltg2001 2011-07-30
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 tx183584 的回复:]
引用 2 楼 wltg2001 的回复:

同上,所以一般不用加什么特殊的头文件。

的确没有.

C/C++ code

GetWindowsPos.cpp(11): error C2065: “Rect”: 未声明的标识符
1>GetWindowsPos.cpp(11): error C2146: 语法错误: 缺少“;”(在标识符“rect”的前面)
1>GetWindow……
[/Quote]
将这一行的前后代码贴出来看看
fangchao918628 2011-07-30
  • 打赏
  • 举报
回复
没有??是加了也没用,还是?
tx183584 2011-07-30
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 wltg2001 的回复:]

同上,所以一般不用加什么特殊的头文件。
[/Quote]
的确没有.

GetWindowsPos.cpp(11): error C2065: “Rect”: 未声明的标识符
1>GetWindowsPos.cpp(11): error C2146: 语法错误: 缺少“;”(在标识符“rect”的前面)
1>GetWindowsPos.cpp(11): error C2065: “rect”: 未声明的标识符
1>GetWindowsPos.cpp(15): error C2065: “rect”: 未声明的标识符
1>GetWindowsPos.cpp(16): error C2065: “rect”: 未声明的标识符
1>GetWindowsPos.cpp(16): error C2228: “.top”的左边必须有类/结构/联合
1> 类型是“'unknown-type'”
tx183584 2011-07-30
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 fangchao918628 的回复:]

windows.h
[/Quote]
没有
wltg2001 2011-07-30
  • 打赏
  • 举报
回复
同上,所以一般不用加什么特殊的头文件。
fangchao918628 2011-07-30
  • 打赏
  • 举报
回复
windows.h

15,979

社区成员

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

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