[futurebasic] Re: [FB] Date Format Set and Get

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2011 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Thu, 17 Mar 2011 10:35:34 +1300

> local fn GetControlClockDate ( c as ControlRef, outDate as ^LongDateRec )
> '~'1
> dim as SInt32           buf
> dim as LongDateRec      controlLongDate
> dim as OSStatus         err
> 
> long if fn GetControlDataSize( c, _kControlEditTextPart, _kControlClockLongDateTag, buf ) == _noErr
> err = fn GetControlData( c, _kControlEditTextPart, _kControlClockLongDateTag, sizeof(LongDateRec), @controlLongDate, buf )
> if ( err == _noErr ) then BlockMoveData( @controlLongDate, outDate, sizeof(LongDateRec) ) // send data back to caller
> end if
> end fn


local fn GetControlClockDate ( c as ControlRef, outDate as ^LongDateRec )
'~'1
end fn = fn GetControlData( c, _kControlClockPart, _kControlClockLongDateTag, sizeof( LongDateRec ), #outDate, 0 )


Robert P.