Programming - cpueblo.com

윈도우의 DATE 형을 COleDateTime 을 이용하여 가져오기


글쓴이 : 유광희 날짜 : 2006-04-01 (토) 13:43 조회 : 15556
아웃룩 ATL 을 활용할때 사용하다 void GetDateToStruct(DATE SrcDate, MASSDATE *OutMassDate) { COleDateTime DateTime = SrcDate; OutMassDate->wYear = DateTime.GetYear(); OutMassDate->wMon = DateTime.GetMonth(); OutMassDate->wDay = DateTime.GetDay(); OutMassDate->wHour = DateTime.GetHour(); OutMassDate->wMin = DateTime.GetMinute(); OutMassDate->wSec = DateTime.GetSecond(); } 참고.. 위의 구조체는 모두 다 unsigned short 로 선언하였을 뿐.. typedef __packed struct _MASSDATE { unsigned short wYear; unsigned short wMon; unsigned short wDay; unsigned short wHour; unsigned short wMin; unsigned short wSec; } MASSDATE;