| 1930 | |
| 1931 | |
| 1932 | ResultType GuiType::ControlSetMonthCal(GuiControlType &aControl, LPTSTR aContents, ResultToken &aResultToken) |
| 1933 | { |
| 1934 | SYSTEMTIME st[2]; |
| 1935 | DWORD gdtr = YYYYMMDDToSystemTime2(aContents, st); |
| 1936 | if (!gdtr) // aContents is empty or invalid (it's not meaningful to set an empty value). |
| 1937 | _o_throw_value(ERR_INVALID_VALUE, aContents); |
| 1938 | if (GetWindowLong(aControl.hwnd, GWL_STYLE) & MCS_MULTISELECT) // Must use range-selection even if selection is only one date. |
| 1939 | { |
| 1940 | if (gdtr == GDTR_MIN) // No maximum is present, so set maximum to minimum. |
| 1941 | st[1] = st[0]; |
| 1942 | //else both are present. |
| 1943 | MonthCal_SetSelRange(aControl.hwnd, st); |
| 1944 | } |
| 1945 | else |
| 1946 | MonthCal_SetCurSel(aControl.hwnd, st); |
| 1947 | ControlRedraw(aControl, true); // Confirmed necessary. |
| 1948 | return OK; |
| 1949 | } |
| 1950 | |
| 1951 | |
| 1952 | ResultType GuiType::ControlGetMonthCal(ResultToken &aResultToken, GuiControlType &aControl) |
nothing calls this directly
no test coverage detected