Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItemDate doubt
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItemDate doubt

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItemDate doubt
    Posted: 05 August 2009 at 9:37am
XTP 13.1.
 
I don't like the initialization of "m_strFormat".
void CXTPPropertyGridItemDate::Init(const COleDateTime& oleDate)
{
    m_nFlags = xtpGridItemHasComboButton | xtpGridItemHasEdit;
    m_strFormat = _T("%d/%m/%Y");
}
 
That's not the desired format on many platforms! Instead, you usually want to format like this:
date.Format(VAR_DATEVALUEONLY)
 
 
This is not possible with your current implementation. I suggest you make this the default.
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2009 at 6:54am
It's a bug!
 
return oleDate.Format();
should be
return oleDate.Format(VAR_DATEVALUEONLY);
 
Otherwise the formatting is erroneous. E.g. with my Swedish setting the date should be formatted as YYYY-mm-dd, but with your code I keep getting YYYY/mm/dd.
PokerMemento - http://www.pokermemento.com/
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.141 seconds.