I am working with CEikClock class and CLOCK resource. Unfortunately there is no info at all in help about CLOCK resource.

One problem is that file EikClockCtrl.hrh is missing in the SDK ver 0.9. So, some enums are not defined (e.g. EEikLocaleConformantClockTypeChangesFormatAccordingToLocale or EEikResourceConstructedClockAnalogDisplayHandOneRevPerXxxxxs or EEikResourceConstructedClockTextJustificationLeft).

I managed to compile my own CLOCK resource. I replaced missing constants with numbers:

RESOURCE CLOCK r_clock_clock
{
type = 0; // EEikLocaleConformantClockTypeChangesFormatAccordingToLocale
typeneverchanges = 0;
digitalresourceid = 0;
analogresourceid = r_clock_analog_clock;
ampmresourceid = 0;
}

RESOURCE ANALOG_CLOCK_FACE r_clock_analog_clock
{
offsetfromuniversaltime = 0;
withdate = 0; // for Series 60
filecontainingface = "*"; // multi-bitmap file
faceid = EMbmClockClock_face; // a value defined in a *.MBG file
centerpointid = EMbmClockCenter_point; // By H.Domon,K3 19 Jun 2001
centeroffset = POINT // POINT offset from left-top point of face
{
x = 50; y = 50;
};
hands = // ANALOG_CLOCK_HANDs
{
ANALOG_CLOCK_HAND
{
type = 0; // EEikResourceConstructedClockAnalogDisplayHandOneRevPer12Hours
featureline = ANALOG_CLOCK_HAND_FEATURE_LINE
{
pen = CLOCK_PEN_SOLID
{
color = 0; // COLOR { red = 0; blue = 0; green = 0; };
size = 7;
};
startpoint = POINT { x = 0; y = 14; };
endpoint = POINT { x = 0; y = -42; };
};
},
ANALOG_CLOCK_HAND
{
type = 1; // EEikResourceConstructedClockAnalogDisplayHandOneRevPerHour
featureline = ANALOG_CLOCK_HAND_FEATURE_LINE
{
pen = CLOCK_PEN_SOLID
{
color = 0; // COLOR { red = 0; blue = 0; green = 0; };
size = 5;
};
startpoint = POINT { x = 0; y = 12; };
endpoint = POINT { x = 0; y = -65; };
};
},
ANALOG_CLOCK_HAND
{
type = 3; // EEikResourceConstructedClockAnalogDisplayHandOneRevPerMinute
featureline = ANALOG_CLOCK_HAND_FEATURE_LINE
{
pen = CLOCK_PEN_SOLID
{
color = 0; // COLOR { red = 0; blue = 0; green = 0; };
size = 1;
};
startpoint = POINT { x = 0; y = 11; };
endpoint = POINT { x = 0; y = -65; };
};
}
};
date = ANALOG_CLOCK_DATE // ANALOG_CLOCK_DATE
{
font = FONT
{
fontid = KScreenFontUidArialNormal8;
flags = EGulFontFlagBold;
};
textcolor = 0;
leftmargin = 0;
rightmargin = 0;
baseline = 0;
// EEikResourceConstructedClockTextJustification[Left|Center|Right]
justification = 0; // EEikResourceConstructedClockTextJustificationLeft
};
}

But when I try to construct CEikClock it crashes with EIK-CLOCK 0 panic. All is ok if I use R_EIK_CLOCK resource insted of my own.

Could you advise what is wrong, please? What is the meaning of startpoint & endpoint (I took the values for them from ER5 SDK Eikon sources).

Thank you in adavnce for your help!

P.S. In CLOCK_PEN_SOLID is color member byte or 3-bytes struct?

Best Regards,
Andrey Scherbakov
Epocware / Paragon Software Group
http://www.epocware.com