jjjjex 发表于 2007-1-26 15:38

[求助]请大家帮我解释一段简短的语句

<P>private: System::Void On_MouseDown(System::Object *  sender, System::Windows::Forms::MouseEventArgs *  e)<BR>             {<BR>                 double sc=1.0;<BR>                 if (e-&gt;Button == MouseButtons::Left)sc=0.9;<BR>                 if (e-&gt;Button==MouseButtons::Right)sc=1.1;<BR>                System::Drawing::Size size=this-&gt;Size;<BR>                if (sc !=1.0)<BR>                {<BR>                    this-&gt;Size=System::Drawing::Size(size.Width* sc,size.Height* sc);</P>
<P>                    }<BR>             }<BR>本人是初学, 运行时出现错误     warning C4244: “参数” : 从“double”转换到“int”,可能丢失数据<BR>不知道怎么回事。还有System::Drawing::Size size=this-&gt;Size; 什么意思。谢谢!<BR></P>

冰镇柠檬汁儿 发表于 2007-1-30 20:08

this-&gt;Size代表这个类中的Size属性

jjjjex 发表于 2007-1-30 20:26

[em01][em01]

页: [1]

编程论坛