知道一条信息的TMsvId,如何打开信息浏览视图
2008-07-31 08:47
381 查看
知道一条信息的TMsvId,想打开信息浏览视图,主要用如下代码实现:
void CMtmEngine::OpenMessage(TMsvId aId) { TMsvEntry msgEntry; // class that represents the entry (a local cache) TMsvId ownerServiceId; if( iSession->GetEntry( aId,ownerServiceId, msgEntry ) != KErrNone ) return; CClientMtmRegistry *cltReg = CClientMtmRegistry::NewL( *iSession ); CleanupStack::PushL( cltReg ); CBaseMtm *mtm = cltReg->NewMtmL( msgEntry.iMtm ); CleanupStack::PushL( mtm ); CMtmUiRegistry *reg = CMtmUiRegistry::NewL( *iSession ); CleanupStack::PushL( reg ); CBaseMtmUi *ui = reg->NewMtmUiL( *mtm ); CleanupStack::PushL( ui ); mtm->SwitchCurrentEntryL( msgEntry.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 ); }
相关文章推荐
- 用什么方法可以在业务批量操作的时候保持原子性?例如删除多条文章,但是在中 间有一条被删除了,假设出现了错误,如何让整个操作回滚,并定位错误信息?
- 如何设置“树视图”来快速浏览文件夹 - [MOSS 2007应用日记]
- 看完后就知道如何提高网站的打开速度,受益非浅!
- 知道设备的GUID,和VidPid,如何知道设备是否已经连接到计算机?
- 如何知道自己的信息
- oracle 10g如何关闭和打开自动收集统计信息!
- linux内核最低等级打印信息如何打开?
- cpu如何知道内存中一条指令的大小从而使cs:ip寄存器更改自己的值
- [转]如何打开pr_debug调试信息
- 在Linux上,如何知道一个可执行文件是否包含调试信息呢?
- Qt-编程模块 001: 浏览(选择)、打开 文件和文件夹(目录) --- 如何让按钮**记忆上次打开的文本路径**的功能
- 如何打开pr_debug调试信息
- 如何知道远程电脑某一端口是否打开?
- 如何通过command line知道自己电脑信息
- 如何用asp.net向其他服务器post一条信息
- 如何打开pr_debug调试信息
- 不想让别人知道自己浏览过哪些网页和打开过哪些文件,应该怎么办?
- linux内核如何打开pr_debug调试信息
- oracle 10g如何关闭和打开自动收集统计信息