Chart_Height_In_Pixels data Error

To add comments, please log in or register
MikeT
304
MikeT  

Hi guys

Could someone tell me why I get a "Possible Loss of Data due to Type Conversion" Error when getting the Chart Height in Pixels... It's not the end of the world, but it is driving me crazy as I have tried everything to get rid of this "Warning"...

// int ChartHeight; set as Global Variable

ChartHeight=ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0);

Thanx...

Anthony Garot
1976
Anthony Garot  

ChartHeight variable is an int, not a long. It needs to be a long, even though the function name has the word "Integer" in it. See the return value in the definition.

long  ChartGetInteger(
   long  chart_id,          // Chart ID
   int   prop_id,           // Property ID
   int   sub_window=0       // subwindow number, if necessary
   );
MikeT
304
MikeT  
Ahhh... thanx Anthony, I missed that completely...
To add comments, please log in or register