Cosmetic 'bug' in CXTPPropertyGridItemDate |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
Posted: 13 February 2007 at 2:40pm |
Hi,
After a few hours of debugging I found a 'cosmetic bug' in CXTPPropertyGridItemDate::SetValue(). When CXTPPropertyGridItemDate::ParseDateTime fails, SetValue() uses COleDateTime::ParseDateTime() to get a result. This function uses the locale ID provided as third parameter to determine the string format. The function only succeeds, when the string format is in Russian date format. I believe this should be changed to LANG_USER_DEFAULT.
I also suggest to NLS enable the date item by default to prevent from always calling SetDateFormat() and SetMask() to get locale dependant date entry.
void CXTPPropertyGridItemDate::SetValue(CString strValue){
COleDateTime dt; TRY
{
if (ParseDateTime(dt, strValue))
{
SetDate(dt);
}
else if (dt.ParseDateTime(strValue, VAR_DATEVALUEONLY, LANG_RUSSIAN)) |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |