WEB开发网
开发学院手机开发Symbian 开发 Symbian 如何创建编辑框 阅读

Symbian 如何创建编辑框

 2010-04-20 15:55:00 来源:WEB开发网   
核心提示:#include <eikrted.h>class CTestEditContainer : public CCoeControl{… …void CreateEditor();CEikRichTextEditor* iRichTextEditor;… …};CTestEditContainer::CTes

#include <eikrted.h>

class CTestEditContainer : public CCoeControl

{

… …

void CreateEditor();

CEikRichTextEditor* iRichTextEditor;

… …

};

CTestEditContainer::CTestEditContainer()

{

// [[[ begin generated region: do not modify [Generated Contents]

// ]]] end generated region [Generated Contents]

iRichTextEditor = NULL;

}

CTestEditContainer::~CTestEditContainer()

{

// [[[ begin generated region: do not modify [Generated Contents]

// ]]] end generated region [Generated Contents]

if (iRichTextEditor)

{

delete iRichTextEditor;

iRichTextEditor = NULL;

}

}

TInt CTestEditContainer::CountComponentControls() const

{

return ( int ) 1;

}

CCoeControl* CTestEditContainer::ComponentControl( TInt aIndex ) const

{

// [[[ begin generated region: do not modify [Generated Contents]

switch ( aIndex )

{

case 0:

return iRichTextEditor;

}

// ]]] end generated region [Generated Contents]

// handle any user controls here…

return NULL;

}

void CTestEditContainer::SizeChanged()

{

CCoeControl::SizeChanged();

LayoutControls();

// [[[ begin generated region: do not modify [Generated Contents]

iRichTextEditor->SetExtent(TPoint(5,5),iSize.operator -(TSize(10,10)));

// ]]] end generated region [Generated Contents]

}

TKeyResponse CTestEditContainer::OfferKeyEventL(

const TKeyEvent& aKeyEvent,

TEventCode aType )

{

// [[[ begin generated region: do not modify [Generated Contents]

1 2  下一页

Tags:Symbian 如何 创建

编辑录入:coldstar [复制链接] [打 印]
赞助商链接