that is supported by FiveWin by the TCalendar class.
What I saw, trying the testcal sample is the some animations are missing, I fixed it adding these pieces of code on the sample (and on every use)
Code: Select all | Expand
// my fix __objDelMethod(oCal, "HandleEvent" ) __objAddMethod(oCal, "HandleEvent", @simplyNil()) __objDelMethod(oCal2, "HandleEvent" ) __objAddMethod(oCal2, "HandleEvent", @simplyNil()) // *** ***
and
Code: Select all | Expand
static function simplyNil()return nil
another way is overriding HandleEvent in TCalendar, of course.
Here a couple of video with the missing animations :https://imgur.com/a/vA0lNfn
Another piece that is missing is the query for size of the control, that I would implement in this way:
Code: Select all | Expand
//----------------------------------------------------------------------------//HB_FUNC( MONTHCAL_GETMINREQRECT ) // hWnd --> { nTop, nLeft, nBottom, nRight }{ HWND hWnd = ( HWND ) fw_parH( 1 ); RECT rct; rct.top = 0; rct.left = 0; rct.bottom = 0; rct.right = 0; if( hWnd ) MonthCal_GetMinReqRect( hWnd, &rct ); hb_reta( 4 ); hb_storvni( rct.top, -1, 1 ); hb_storvni( rct.left, -1, 2 ); hb_storvni( rct.bottom, -1, 3 ); hb_storvni( rct.right, -1, 4 );}//----------------------------------------------------------------------------//HB_FUNC( MONTHCAL_SIZERECTTOMIN ) // hWnd,{ nTop, nLeft, nBottom, nRight } --> { nTop, nLeft, nBottom, nRight }{ HWND hWnd = ( HWND ) fw_parH( 1 ); RECT rct; rct.top = hb_parvni( 2, 1 ); rct.left = hb_parvni( 2, 2 ); rct.bottom = hb_parvni( 2, 3 ); rct.right = hb_parvni( 2, 4 ); if( hWnd ) MonthCal_SizeRectToMin( hWnd, &rct ); hb_reta( 4 ); hb_storvni( rct.top, -1, 1 ); hb_storvni( rct.left, -1, 2 ); hb_storvni( rct.bottom, -1, 3 ); hb_storvni( rct.right, -1, 4 );}//----------------------------------------------------------------------------//
From MSDN:
MonthCal_GetMinReqRect
Retrieves the minimum size required to display a full month in a month calendar control. Size information is presented in the form of a RECT structure.
MonthCal_SizeRectToMin
Calculates how many calendars will fit in the given rectangle, and then returns the minimum size that a rectangle needs to be to fit that number of calendars.