| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Help type casting int to TColor in C++
I am trying to get a hexa-representation of a TColor from a file and turn that into a form that TColor can interupt
File that I am getting the color info from is: ------------------------------------------- LineColor=8388608 FillColor=65280 ------------------------------------------- Code here: ------------------------------------------- char cstrWork[80]; int lc, fc; sscanf(cstrWork,"LineColor=%d",&lc); sscanf(cstrWork,"FillColor=%d",&fc); //Trying to type cast an int to TColor format setLineColor(TColor(lc)); setFillColor(TColor(fc)); void CShape::setLineColor(TColor lc){ LineColor_ = lc; } void CShape::setFillColor(TColor fc) { FillColor_ = fc; } ------------------------------------- Hope this is enough info from my program. Thanks for the help |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Help type casting int to TColor in C++ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|