I made this simply test with tcalendar ( I 'm using win7)
I inserted a calendar class( Daniel) on a dialog
It give me Unrecoverable error 9023 " hb_grab request to allocate memory zero bytes " why ? can the tcalendar class run only on a window or it is a bug ?
I inserted a calendar class( Daniel) on a dialog
#include "FiveWin.ch"
#include "constant.ch"
#include "calendar.ch"
#define LIGHTCYAN nRGB( 203, 225, 252 )
FUNCTION test()
Local oDlgCal
LOCAL dDate1
LOCAL aDates
Local oCal
Local nBottom := 12
Local nRight := 25
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
SET DATE TO BRITISH
SET EPOCH TO 1980
dDate1 = Date()
aDates := { CToD( "15/04/2010" ),;
CToD( "28/04/2010" ),;
CToD( "01/05/2010" ),;
CToD( "15/05/2010" ),;
CToD( "16/05/2010" ),;
CToD( "03/06/2010" ) }
DEFINE DIALOG oDlgCal ;
TITLE "Calendario" ;
SIZE nWidth, nHeight TRANSPARENT PIXEL ;
GRADIENT { { 1,CLR_WHITE, LIGHTCYAN } } ;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )
@ 15, 15 CALENDAR oCal VAR dDate1 OF oDlgCal PIXEL DAYSTATE
OnGetState( oCal, aDates )
oCal:SetDayState()
oCal:bOnGetState = { | oCal | OnGetState( oCal, aDates ) }
ACTIVATE DIALOG oDlgCal
RETURN NIL
Function OnGetState( oCal, aDates )
LOCAL i, imax, j, jmax, nDay, nDayState, nMonth
LOCAL dStartDate
LOCAL dCurrentDay := oCal:dDate
oCal:GetMonthRange()
dStartDate = oCal:dDate
nMonth := Month( dStartDate )
FOR i = 1 TO Len( aDates )
nDayState := 0
IF Month( aDates[ i ] ) == nMonth
oCal:SetArrayDayState( 1, Day( aDates[ i ] ) )
ENDIF
NEXT
oCal:SetDate( dCurrentDay )
return nilIt give me Unrecoverable error 9023 " hb_grab request to allocate memory zero bytes " why ? can the tcalendar class run only on a window or it is a bug ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com