如何使用Rect Class? [英] how to use Rect Class?

查看:112
本文介绍了如何使用Rect Class?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vs2010下的MFC项目中使用了Rect Class,如下所示:

i used Rect Class in my MFC project under vs2010 like this:

Rect m_rect



和包括< gdiplus.h>,但仍然出现此错误:


and include <gdiplus.h>, but still got this error:

Error:identifier "Rect" is undifined



有谁能告诉我为什么?


is there anyone who can tell me why?

推荐答案

谢谢大家,我自己解决了,只是一个简单的错误。当使用 命名空间 Gdiplus 添加
thank you all, i have solved it myself, just one simple mistake. i forgot to import namespace Gdiplus, when add
using namespace Gdiplus

,问题解决了


您可能想要使用 CRect 类。



请注意,所有MFC类名称都以大写的C字母开头。
You probably wanted to use the CRect class.

Note that all MFC class names begin with an uppercase ''C'' letter.


这篇关于如何使用Rect Class?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆