All,
I need to be able to set and read the minutes and seconds for a date time
control, but from the XS code it looks like this is not possible (!?).
From the Microsoft documentation it looks like it would be straight forward
to add this functionality to the code below.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/datetime/macros/datetime_setsystemtime.asp
But
Ive never built win::gui from scratch, nor played with XS. I must admit
that I am daunted at the prospect! I am desperate, so am willing to go
through the learning curve and would be grateful for any pointers to where I
should start.
Could sending messages to the control work? Ive tried it, but didnt get
anywhere fast
Thanks,
Jez.
###########################################################################
# (@)METHOD:GetDate()
# (preliminary) Returns the date in the DateTime control in a three
# elements array (day, month, year).
void
GetDate(handle)
HWND handle
PREINIT:
SYSTEMTIME st;
PPCODE:
if(DateTime_GetSystemtime(handle, &st) == GDT_VALID) {
EXTEND(SP, 3);
XST_mIV(0, st.wDay);
XST_mIV(1, st.wMonth);
XST_mIV(2, st.wYear);
XSRETURN(3);
} else {
XSRETURN_UNDEF;
}
###########################################################################
# (@)METHOD:SetDate(DAY, MONTH, YEAR)
# (preliminary) Sets the date in the DateTime control in a three
# elements array (day, month, year).
BOOL
SetDate(handle, day, mon, year)
HWND handle
int day
int mon
int year
PREINIT:
SYSTEMTIME st;
CODE:
ZeroMemory(&st, sizeof(SYSTEMTIME));
st.wDay = day;
st.wMonth = mon;
st.wYear = year;
RETVAL = DateTime_SetSystemtime(handle, GDT_VALID, &st);
OUTPUT:
RETVAL
##############################
_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger