(Granted it's working now, but...) Either I'm completely retarded or somebody at MS needs to be beaten with a claw hammer.
Here's my train of thought:
SYSTEMTIME st[2]; <- array of two Items st[0] & st[1]
Which allows the assumption that:
GDTR_MIN = element 1 or st[0]
GDTR_MAX = element 2 or st[1]
So... (I'll drop to using only one control for clarity) ...This Should Work:
GetLocalTime(&st[0]); populate ele1
GetLocalTime(&st[1]); populate ele2
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MIN, &st[0]);
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MAX, &st[1]);
But it doesn't - However...
GetLocalTime(&st[1]); populate ele2 only
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MIN, &st[0]);
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MAX, &st[1]);
Results in MIN working & MAX Failing
Now the weird part...
GetLocalTime(&st[1]); Once again populate ele2 only
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MIN, &st[1]);
DateTime_SetRange(GetDlgItem(hDlg, IDCDT_CRS_ANALDATE), GDTR_MAX, &st[0]);
Results in both MIN & MAX Working, even tho st[0] is pointing at an empty array element.
...Now can anybody explain this? ...or do I need to go get a hammer?