Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Incorrect number format in CExtEditSystemCurrency Collapse All
Subject Author Date
Rado Manzela Aug 10, 2014 - 6:58 AM

You have bug in void CExtEditSystemCurrency::_Init() at multiple places:

C:\work\Prof-UIS\Src\ExtEdit.cpp(4484):			g_ResourceManager->GetLocaleInfo( LOCALE_INEGNUMBER, &cNegNumFormatIndex, sizeof( cNegNumFormatIndex ) / sizeof(TCHAR) );
  C:\work\Prof-UIS\Src\ExtEdit.cpp(4515):		g_ResourceManager->GetLocaleInfo( LOCALE_IDIGITS, &cNoOfDigitsAfterDecimal, sizeof( cNoOfDigitsAfterDecimal ) / sizeof(TCHAR) );
  C:\work\Prof-UIS\Src\ExtEdit.cpp(4519):		g_ResourceManager->GetLocaleInfo( LOCALE_ILZERO, &cDisplayLeadingZeros, sizeof( cDisplayLeadingZeros ) / sizeof(TCHAR) );
  C:\work\Prof-UIS\Src\ExtEdit.cpp(7172):		g_ResourceManager->GetLocaleInfo( LOCALE_ICURRENCY, &cPosCurFormatIndex, sizeof( cPosCurFormatIndex ) / sizeof(TCHAR) );
  C:\work\Prof-UIS\Src\ExtEdit.cpp(7209):		g_ResourceManager->GetLocaleInfo( LOCALE_ICURRDIGITS, &cNoOfDigitsAfterDecimal, sizeof( cNoOfDigitsAfterDecimal ) / sizeof(TCHAR) );
  C:\work\Prof-UIS\Src\ExtEdit.cpp(7213):		g_ResourceManager->GetLocaleInfo( LOCALE_ILZERO, &cDisplayLeadingZeros, sizeof( cDisplayLeadingZeros ) / sizeof(TCHAR) );



You are incorrectly providing buffer for the output. You have correctly implemented getting value of LOCALE_INEGCURR for negative currency format, but incorrectly LOCALE_ICURRENCY so the edit box displays positive numbers incorrectly.

Art Wilkes Aug 11, 2014 - 4:36 PM

We need more (specific) information. What is going wrong with LOCALE_ICURRENCY ?
Prof-UIS Support.

Rado Manzela Aug 12, 2014 - 11:06 AM

Problem is with the buffer size, you need to provide 2 character buffer because of trailing null character, just check how do you get value of LOCALE_INEGCURR

Art Wilkes Aug 11, 2014 - 4:36 PM

We need more (specific) information. What is going wrong with LOCALE_ICURRENCY ?
Prof-UIS Support.