| 1866 | |
| 1867 | |
| 1868 | ResultType GuiType::ControlSetDateTime(GuiControlType &aControl, LPTSTR aContents, ResultToken &aResultToken) |
| 1869 | { |
| 1870 | SYSTEMTIME st; |
| 1871 | if (*aContents) |
| 1872 | { |
| 1873 | if (YYYYMMDDToSystemTime(aContents, st, true)) |
| 1874 | DateTime_SetSystemtime(aControl.hwnd, GDT_VALID, &st); |
| 1875 | else |
| 1876 | _o_throw_value(ERR_INVALID_VALUE, aContents); |
| 1877 | } |
| 1878 | else // User wants there to be no date selection. |
| 1879 | { |
| 1880 | // Ensure the DTS_SHOWNONE style is present, otherwise it won't work. However, |
| 1881 | // it appears that this style cannot be applied after the control is created, so |
| 1882 | // this line is commented out: |
| 1883 | //SetWindowLong(aControl.hwnd, GWL_STYLE, GetWindowLong(aControl.hwnd, GWL_STYLE) | DTS_SHOWNONE); |
| 1884 | DateTime_SetSystemtime(aControl.hwnd, GDT_NONE, &st); // Contents of st are ignored in this mode. |
| 1885 | } |
| 1886 | return OK; |
| 1887 | } |
| 1888 | |
| 1889 | |
| 1890 | ResultType GuiType::ControlSetDateTimeFormat(GuiControlType &aControl, LPTSTR aFormat, ResultToken &aResultToken) |
nothing calls this directly
no test coverage detected