×
Namespaces

Variants
Actions

信息弹出框API

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
hoolee 在 30 May 2008 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

CS000945


  • 开发伙伴平台:

S60 3rd Edition, MR


  • 详细描述

CAknInfoPopupNoteController可显示弹出信息。它使用一个活动对象和一个定时器,可以每隔一段时间(缺省1秒)就会显示一个弹出框,在一定时间后(缺省为10秒)又会自动消失。


  • MMP文件

需要下列能力和库:

CAPABILITY      NONE
LIBRARY avkon.lib


  • 头文件
#include <akninfopopupnotecontroller.h>
 
// Set the note as the member variable of your application view (for example, CAknView)
private:
CAknInfoPopupNoteController* iNote;


  • 源文件
void CMyView::ShowNoteL()
{
if (!iNote)
{
// Create the note once
iNote = CAknInfoPopupNoteController::NewL();
}
// Hide the note. The last note may be visible when creating the second
iNote->HideInfoPopupNote();
 
// Set the time delay period before the popup is shown (in milliseconds)
iNote->SetTimeDelayBeforeShow(100);
 
// Set the time period of how long the popup is in the view (in milliseconds)
iNote->SetTimePopupInView(2*1000);
 
// Note text
iNote->SetTextL(_L("CAknInfoPopupNoteController"));
 
// Note position
iNote->SetPositionAndAlignment(TPoint(10,10),EHLeftVTop);
 
// Show note
iNote->ShowInfoPopupNote();
}
 
void CMyView::DoDeactivate()
{
// TODO: Your view deactivate code here
 
// Remeber to delete the note
delete iNote;
}
This page was last modified on 15 December 2011, at 09:29.
93 page views in the last 30 days.
×