Saturday, November 03, 2007

How to launch a message editor

         CClientMtmRegistry *cltReg = CClientMtmRegistry::NewL( *iSession );
CleanupStack::PushL( cltReg );

CBaseMtm *mtm = cltReg->NewMtmL( aEntry.iMtm );
CleanupStack::PushL( mtm );

CMtmUiRegistry *reg = CMtmUiRegistry::NewL( *iSession );
CleanupStack::PushL( reg );

CBaseMtmUi *ui = reg->NewMtmUiL( *mtm );
CleanupStack::PushL( ui );

mtm->SwitchCurrentEntryL( aEntry.Id() );
//Editor are embedded.
ui->SetPreferences( EMtmUiFlagEditorPreferEmbedded );

CMsvOperationActiveSchedulerWait *waiter = CMsvOperationActiveSchedulerWait::NewLC();

CMsvOperation* op = ui->ViewL( waiter->iStatus );

waiter->Start();

delete op;
CleanupStack::PopAndDestroy( 5, cltReg );

No comments:

stats counter