Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Add a date item with NULL-Date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add a date item with NULL-Date

 Post Reply Post Reply
Author
Message
BerntK View Drop Down
Groupie
Groupie
Avatar

Joined: 15 September 2008
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote BerntK Quote  Post ReplyReply Direct Link To This Post Topic: Add a date item with NULL-Date
    Posted: 15 December 2008 at 5:27pm
Hi,
I would like to add a date item with initial NULL-date (dtDate.SetStatus(COleDateTime::null)).


pDate = (CXTPPropertyGridItemDate*) pGroupItem->AddChildItem(new CXTPPropertyGridItemDate (_T("Date\nDate"), dtDate,&dtDate));


CXTPPropertyGridItemDate::SetDate asserts as there is no way to preset the m_strNullValue as it is done by CXTPPropertyGridItemDate::AllowNullDate .

Any ideas?


Bernt





Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2008 at 2:07am
Hi,
 
Set some non NULL date first and then call AllowNullDate  + SetDate(dtDate).
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BerntK View Drop Down
Groupie
Groupie
Avatar

Joined: 15 September 2008
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote BerntK Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2008 at 3:41am
Hi,

...thats not straight ahead.

I tried a derived class, overwriting SetDate(), but forgot that within the constructor, the baseclass of SetDate() is called...

Any other ideas?

Bernt
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.