Need some help to C++ if statement to catch the -0.01 to -0.99
Need some help to C++ if Statement.
I will not catch the -0.01 to -0.99 with this if statement.
The crText will be blue and not red
prozent= double variable
if(prozent<0)
{
crText = RGB(255,0,0); //red
}
else
{
crText = RGB(0,0,255); //blue
}
Please let me know how I can fix this simple statement.
Thank you.
Best regards,
Thomas
I found the solution....very simple it was my mistake (today is Monday)
str_help=m_List.GetItemText(iRow,iCol);
double prozent; str_help.Replace(',',',.');
prozent=atof(str_help);
In my List View the data is in German writing : with a "," f.e. 0,33 -0,33
I have to replace the "," with "." then it works
Sorry to bother you.
Best regards,
Thomas
Open in new window
The code is in OnCustomdrawList.