converting tag number to int

Posted by Ehtesham Sajed on Stack Overflow See other posts from Stack Overflow or by Ehtesham Sajed
Published on 2011-01-14T17:52:36Z Indexed on 2011/01/14 17:53 UTC
Read the original article Hit count: 177

Filed under:
|

i m using Visual C++2008. i've assigned tag value=2 of all buttons from button property(using drag n drop). now i want to make some math calculation with tag value. need to change it in int. what is the default data type tag? i used this code, //code sample if(((int)this->button1->Tag)((int)this->button2->Tag)((int)this->button3->Tag)==50) { ........ //i.e, if tag value of button1*tag value of button2*tag value of button 3==50 then... ........ }

generated following run time error on a messegebox An unhandled exception of type 'System.InvalidCastException' occurred in learncpp1.exe

Additional information: Specified cast is not valid.

© Stack Overflow or respective owner

Related posts about tags

Related posts about data-type-conversion