| | |
| | | #include "wobject/xcontrol.hpp" |
| | | #include "win32/win.hpp" |
| | | |
| | | struct SYSTEMTIME |
| | | { |
| | | short wYear; |
| | | short wMonth; |
| | | short wDayOfWeek; //星期,0=星期日,1=星期一 |
| | | short wDay; |
| | | short wHour; |
| | | short wMinute; |
| | | short wSecond; |
| | | short wMilliseconds; //毫秒 |
| | | }; |
| | | |
| | | class xdatetimepick: public xcontrol |
| | | { |
| | |
| | | int GDT_VALID = 0x0; |
| | | int DTM_FIRST = 0x1000; |
| | | int DTM_SETSYSTEMTIME = DTM_FIRST + 2; |
| | | int WM_KILLFOCUS = 0x0008; |
| | | int WM_SETFOCUS = 0x0007; |
| | | int WM_KILLFOCUS_ = 0x0008; |
| | | int WM_SETFOCUS_ = 0x0007; |
| | | SendMessage(GetHWND(), DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM) & fdate); |
| | | return 1; |
| | | } |