读书人

Ambiguity between #039;Rect#039; and #039;_fast

发布时间: 2012-03-13 11:21:11 作者: rapoo

Ambiguity between 'Rect' and '_fastcall Classes::Rect(int,int,int,int)'
BCB6.0 中编译出现:Ambiguity between 'Rect' and '_fastcall Classes::Rect(int,int,int,int)';
代码如下:
RECT rect=Rect(20,20,220,80);
this->Canvas->Rectangle(20,20,220,80);
DrawText(this->Canvas->Handle,"An example of DrawText.",1,&rect,DT_END_ELLIPSIS|DT_MODIFYSTRING);

怎么办啊。

[解决办法]
RECT rect=Rect(20,20,220,80);
换成:
RECT rect= { 20, 20, 220, 80 };

或者直接用TRect也行。

读书人网 >C++ Builder

热点推荐