how to print SYSTEMTIME
-
Hello I'm new in MFC and all this small and ease tasks in c# seems to me very impossible in MFC. I'm trying to do a log file. I need to take the current system time and date and then transformed it in CString in order to write them in the file. Tnx for the help, And have a nice weekend.
-
Hello I'm new in MFC and all this small and ease tasks in c# seems to me very impossible in MFC. I'm trying to do a log file. I need to take the current system time and date and then transformed it in CString in order to write them in the file. Tnx for the help, And have a nice weekend.
Use
CString::Format
(or sprintf in the example below) see this[^] for an example.Maximilien Lincourt Your Head A Splode - Strong Bad
-
Hello I'm new in MFC and all this small and ease tasks in c# seems to me very impossible in MFC. I'm trying to do a log file. I need to take the current system time and date and then transformed it in CString in order to write them in the file. Tnx for the help, And have a nice weekend.
mihai123 wrote:
all this small and ease tasks in c# seems to me very impossible in MFC.
You mean MFC is hard? You must write an ActiveX control in plain Win32, my friend :rolleyes:
SYSTEMTIME time; GetSystemTime(&time); CString str; str.Format("Year: %d, Month:%d, Day of month:%d, Day of week:%d",time.wYear, time.wMonth, time.wDay, time.wDayOfWeek); AfxMessageBox(str);
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
mihai123 wrote:
all this small and ease tasks in c# seems to me very impossible in MFC.
You mean MFC is hard? You must write an ActiveX control in plain Win32, my friend :rolleyes:
SYSTEMTIME time; GetSystemTime(&time); CString str; str.Format("Year: %d, Month:%d, Day of month:%d, Day of week:%d",time.wYear, time.wMonth, time.wDay, time.wDayOfWeek); AfxMessageBox(str);
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
You mean MFC is hard? You must write an ActiveX control in plain Win32, my friend
Never used
MFC
for that.ATL
was far much better ;P .If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Rajesh R Subramanian wrote:
You mean MFC is hard? You must write an ActiveX control in plain Win32, my friend
Never used
MFC
for that.ATL
was far much better ;P .If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeCPallini wrote:
ATL was far much better
No, the point was that the OP said doing things with MFC is hard. So, I thought how nice it must be for the OP to write an ActiveX control with Win32, not even MFC. :rolleyes:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP