I want to display a warning Note.
For that I have written the below code :
HBufC* buf = StringLoader::LoadLC(R_WARNING_TEXT);
CAknWarningNote* warningNote;
warningNote = new ( ELeave ) CAknWarningNote;
warningNote->ExecuteLD( *buf);
CleanupStack::PopAndDestroy( buf );
But there is a problem when I build the code.
The error is :
Undefined symbol: 'class HBufC16 * StringLoader::LoadLC(int, class CCoeEnv *)(?LoadLC@StringLoader@@SAPAVHBufC16@@HPAVCCoeEnv@@@Z)' referenced from 'void CSettingExampleAppUi::HandleCommandL(int) (?HandleCommandL@CSettingExampleAppUi@@UAEXH@Z)'
If I use :
HBufC* buf = iEikonEnv->AllocReadResourceLC(R_WARNING_TEXT)
CAknWarningNote* warningNote;
warningNote = new ( ELeave ) CAknWarningNote;
warningNote->ExecuteLD( *buf);
CleanupStack::PopAndDestroy( buf );
No problem and the note is displayed.
But I need StringLoader::LoadLC in order to display a text with a variable.
Somebody could help me?
Thanks.

Reply With Quote


