October 7th, 2009, 07:02 AM
#1
API for getting year range
Hi All,
Please see the attachement.
What is the API for getting the range of year value.
It seems GetLocaleInfo doesn not return that.
Thanks in advance
Attached Images
October 7th, 2009, 07:11 AM
#2
Re: API for getting year range
October 14th, 2009, 02:24 AM
#3
Re: API for getting year range
Please find the code snippet for finding MaxYear using GetCalendarInfo
void CSampleDlg::GetMaximumYear()
{
CString csMaxYear;
TCHAR tcBuffer[256];
int nSize = GetCalendarInfo( LOCALE_SYSTEM_DEFAULT,
CAL_GREGORIAN_US,
CAL_ITWODIGITYEARMAX,
tcBuffer,
0,
0 );
LPTSTR lpDateFmt = csMaxYear.GetBuffer( nSize );
nSize = GetCalendarInfo( LOCALE_SYSTEM_DEFAULT,
CAL_GREGORIAN_US,
CAL_ITWODIGITYEARMAX,
lpDateFmt,
nSize,
0 );
csMaxYear = lpDateFmt;
}
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width