Print Page | Close Window

CXTPPropertyGridItemDate Bug.

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=4121
Printed Date: 10 November 2025 at 10:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItemDate Bug.
Posted By: Italo
Subject: CXTPPropertyGridItemDate Bug.
Date Posted: 03 May 2006 at 11:12am

Run PropertyGridD.exe; go to an item that uses CXTPPropertyGridItemDate; enter 01/01/0999. Can this please be fixed ASAP?

 

Thanks,

Italo




Replies:
Posted By: Oleg
Date Posted: 03 May 2006 at 3:55pm
Hmm, I entered it and see 01/01/0999.. What version do you have?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Italo
Date Posted: 03 May 2006 at 9:56pm

I'm using version 10.1.1

When I enter 01/01/0999 and press enter I get an assert.

Thanks,

Italo



Posted By: Oleg
Date Posted: 04 May 2006 at 11:21am

Hmmm. Seems it is bug of Visual Studio 2005... I guess you use it?

IN Visual Stuidio 6, 2002, 2003 strftime.c looks:

 case('Y'):       &n bsp;      /* year w/ century */
             temp = (((timeptr->tm_year/100)+19)*100) +
                    (timeptr->tm_year%100);
             /* pass alternate_form as the no leading zeros flag */
             _store_num(temp, 4, string, left, alternate_form);
             break;

in Visual Studio 2005 as:

case('Y'): /* year w/ century */

{

_VALIDATE_RETURN( ( timeptr->tm_year >=0 ), EINVAL, FALSE)

temp = (((timeptr->tm_year/100)+19)*100) +

(timeptr->tm_year%100);

/* pass alternate_form as the no leading zeros flag */

_store_num(temp, 4, string, left, alternate_form);

break;

}

It is not right to compare with 0, because 0 is 1900th year. Will check what can be done. :( Seems Visual Studio 2005 just not support date earlier than 1900.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Oleg
Date Posted: 04 May 2006 at 11:26am

It can be easy reproduce with

COleDateTime date;

date.SetDate(1800, 1, 1);

CString str = date.Format("%m, %d, %Y");

All Visual Studios except 2005 correctly parse it :(

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Italo
Date Posted: 04 May 2006 at 11:30am

Thanks, I really appreciate you looking into this. So, what can we do?

 

Thanks again,

Italo



Posted By: Oleg
Date Posted: 04 May 2006 at 4:48pm

Hello, see the patch that we will use for next release.

https://forum.codejock.com/uploads/oleg/2006-05-04_164750_Patch.zip - 2006-05-04_164750_Patch.zip

 

Thank you for this point. Need to write to Microsoft about this bug...



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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