Ambiguity between 'TGridDrawState' and 'Grids::TGridDrawState'

lovetsfuer 2010-01-14 03:17:20
[C++ Error] MainWheatAudit.h(67): E2015 Ambiguity between 'TGridDrawState' and 'Grids::TGridDrawState'
很少纳闷啊,只要用到dbgrid的DrawColumnCell属性就会出现这样的问题
是什么原因


#include <DBGrids.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <ImgList.hpp>
#include "DosMove.hpp"
#include "DBGridEh.hpp"
#include "GridsEh.hpp"

       
void __fastcall dbgrdhListAuditDrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumnEh *Column,
TGridDrawState State);
-这个声明的错误
上面是头文件的引用,查找了论坛的帖子有点深没弄懂

...全文
231 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
haiandj 2010-01-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhouzhangkui 的回复:]
未曾出现lz的问题
如果出错 lz 可以把参数改一下
C/C++ code//.h部分void __fastcall DBGrid1DrawColumnCell(TObject*Sender,const TRect&Rect,int DataCol, TColumn*Column,
Grids::TGridDrawState State);//加上Grids:://.CPP部分void __fastcall TForm1::DBGridEh1DrawColumnCell(TObject*Sender,const TRect&Rect,int DataCol, TColumnEh*Column,
Grids::TGridDrawState State)//加上Grids::
{

}//编译弹出对话框 选择No 就可以
[/Quote]
正解,编译器无法判断域导致
周药师 2010-01-14
  • 打赏
  • 举报
回复
未曾出现lz的问题
如果出错 lz 可以把参数改一下

//.h部分
void __fastcall DBGrid1DrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumn *Column,
Grids::TGridDrawState State); //加上Grids::
//.CPP部分
void __fastcall TForm1::DBGridEh1DrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumnEh *Column,
Grids::TGridDrawState State) //加上Grids::

{

}
//编译弹出对话框 选择No 就可以

13,874

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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