Announcement
Collapse
No announcement yet.
DateTime_SetRange
Collapse
X
-
Like any skill (I did refer to it as a "skill" didn't I? Whew! Yes, I did), Cliff, reading, understanding and applying improves with practice.
-
"reading, understanding and applying the Microsoft Windows API
documentation"
Can't even BEGIN to explain how many times I read, re-read, and re-read again the docs
Sometimes I could get 3 or even more "Understanding"'s of what the docs say, and when I think I FINALLLLLLlllllllyyyyy get it
Try...if fail, try again and again until no fail....orrrrrrr if just can not find what I missed
I don't know about the rest of you guys, but I sure get a lot more of knowledge from a simple working example, than I do from the docs. ESPECIALLY well commented code that does something similar (or even just part of) the idea I am trying to do.
But hey...thats what PB is for....to illuminate the ole dim bulb and make you go "DOH"so that you finally learn what you totally misunderstood before
(and yes....as many of you know....I probably have a daily (or close enough) case of CNDS)
Leave a comment:
-
Amazing.
Youand Good Things Happen.
Anyone still wonder why I say "reading, understanding and applying the Microsoft Windows API documentation" is a skill all PB programmers should - no, must - consider fundamental?
Leave a comment:
-
Without testing, I can just cite the SDK...
GDTR_MIN
The first [italics mine] element in the SYSTEMTIME structure array is valid and will be used to set the minimum allowable system time.
GDTR_MAX
The second element in the SYSTEMTIME structure array is valid and will be used to set the maximum allowable system time.
But it appears you can do both in one shot...
Code:LOCAL dt() AS SYSTEMTIME REDIM dt(1) dt(0) = Minimum dt(1) = Maximum iret = DateTime_setRange (hdp, %GDTR_MIN OR %GDTR_MAX, BYVAL VARPTR(dt(0))
Leave a comment:
-
DateTime_SetRange
Hi,
I am trying to set the valid range (a month) to a calendar control. It works fine with the low date or with the high date, but I am unable to set a range (only days from a defined month are allowed). Can somebody point me in the right direction please?
Code:LOCAL dt AS SYSTEMTIME control handle cbhndl, %IDC_BUDAT to hdp if isfalse DateTime_SetRange (hdp, %GDTR_MIN, dt) then ? "Can't set min range" end if dt.wDay=VAL(right$(LastDay(sDate),2)) if isfalse DateTime_SetRange (hdp, %GDTR_MAX, dt) then ? "Max-Bereich kann nicht gesetzt werden" end if
rgds
WernerTags: None
Leave a comment: