Print Page | Close Window

Bug in CXTPPropertyGridItemDouble

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5460
Printed Date: 11 November 2025 at 4:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug in CXTPPropertyGridItemDouble
Posted By: nobs
Subject: Bug in CXTPPropertyGridItemDouble
Date Posted: 08 November 2006 at 6:45am
Hello

There is a Bug in the
CXTPPropertyGridItemDouble class
in the function:

CString CXTPPropertyGridItemDouble::DoubleToString(double dValue)
you have the code
    CString strFormat(m_strFormat);
    if (strFormat.IsEmpty())
        strFormat = _T("%0.2f");

    CString strValue;
    strValue.Format(m_strFormat, dValue);
    return strValue;

The red line should be replaced with  like
    strValue.Format(strFormat, dValue);
                    ^^^^^^^
                                             you are referencing the wrong variable

File   XTPPropertyGridItemNumber.cpp
Linenumber 193

I found this problem when using the function  "UseSystemDecimalSymbol"





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net