Namespaces
Variants
Actions

CNotepadApi

Jump to: navigation, search
Article Metadata

Article
Created: Den123 (07 Sep 2007)
Last edited: hamishwillee (20 Jul 2012)

If you want to give your users the ability to enter bigger amount of text then you can use CNotepadApi.

NB! The editor of this class has Find menu item under Options. If you don't have ReadDeviceData and WriteDeviceData capabilities set, then your app will panic with KERN-EXEC 0 when selecting this menu item.

Linking and header required:

link against: NpdLib.lib 
header required: #include <npdapi.h>

TInt aReturnStatus=0;
HBufC *buf=NULL;
TRAPD(err,buf=CNotepadApi::ExecTextEditorL(aReturnStatus,iText,_L("Edit Text"),_L("Delete txt?")));
 
if(aReturnStatus==3007 || aReturnStatus==KErrNone)
iText.Copy(*buf);
 
delete buf;
buf = NULL;

Following is the code to fetch template using CNotepadeApi

CNotepadApi * pNotePad = CNotepadApi:: NewLC (); 
HBufC* pTemplate = NULL;
pTemplate = pNotePad->FetchTemplateL();
if(pTemplate)
{
//copy pTemplate into a buffer and can use in your application.
}
delete pTemplate;
CleanupStack::PopAndDestroy(pNotePad);
This page was last modified on 20 July 2012, at 05:18.
147 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved