How to get the format of users local date and time?
-
Hi, In my one application I ma having a MFC CDateTimeCtrl control. The requirement is that, the format of date and time of this control and the users local date and time should be same. Means if users format is 24hr clock my control should also display the time in 24hr format. I have following two questions regarding this. 1] How I can know that user changed the format of his time? (I can find the time change by ON_WM_TIMECHANGE message but what if user changed only format and not the time?) 2] How to get the current format of users local date and time? Regards, Hemant kulkarni
-
Hi, In my one application I ma having a MFC CDateTimeCtrl control. The requirement is that, the format of date and time of this control and the users local date and time should be same. Means if users format is 24hr clock my control should also display the time in 24hr format. I have following two questions regarding this. 1] How I can know that user changed the format of his time? (I can find the time change by ON_WM_TIMECHANGE message but what if user changed only format and not the time?) 2] How to get the current format of users local date and time? Regards, Hemant kulkarni
consider using COleDateTime. COleDateTime::Format CString Format( DWORD dwFlags = 0, LCID lcid = LANG_USER_DEFAULT ); haribabu