Hi All,

I am trying to use the
MCoeCaptionRetrieverForFep
to get
the caption of the focused control from inside my FEP Control. In order to
find out whether it is working I ammended the FEPExample (that is shipped
in this forum) and I have inserted the following lines of code at the end
of the method
CExampleFepControl::HandleChangeInFocusL()
:

Code:
	MCoeCaptionRetrieverForFep *l_MCoeCaptionRetrieverForFep = NULL;
	l_MCoeCaptionRetrieverForFep = iInputCapabilities.CaptionRetrieverForFep();
	if ( l_MCoeCaptionRetrieverForFep ) {

		m_apDebugTracer->printline( __FILE__, __LINE__, "CExampleFepControl::HandleChangeInFocusL(): new focus control can give caption." );
		
		// the new focused control can give us its caption
		// We will trace the caption
		TBuf<KMaxFileName> l_caption;
		l_MCoeCaptionRetrieverForFep->GetCaptionForFep( l_caption );
		if ( l_caption.Length() > 0 ) {
			TBuf<KMaxFileName> l_lineToWrite;
			l_lineToWrite.Copy( _L("CExampleFepControl::HandleChangeInFocusL(): caption = ") );
			l_lineToWrite.Append( l_caption );
			m_apDebugTracer->printline( __FILE__, __LINE__, l_lineToWrite );
		}
		else {
			m_apDebugTracer->printline( __FILE__, __LINE__, "CExampleFepControl::HandleChangeInFocusL(): caption has length 0" );
		}
	}// if the new focused control can give us its caption
	else {
		m_apDebugTracer->printline( __FILE__, __LINE__, "CExampleFepControl::HandleChangeInFocusL(): new focus control cannot give caption." );
	}
Note: I am using a debug tracer to trace the captions if found, or other
information if not found.

The point here is that either the focused controls do not support the
MCoeCaptionRetrieverForFep
interface or, if they support
it, the method
GetCaptionForFep
returns caption of 0 length.

Can anybody help me and tell me what I am doing wrong, or what should I
do to get the captions of the underlying controls?

Thanks in advance
Panayotis