本文整理汇总了C++中CEikEdwin::GetTextInHBufL方法的典型用法代码示例。如果您正苦于以下问题:C++ CEikEdwin::GetTextInHBufL方法的具体用法?C++ CEikEdwin::GetTextInHBufL怎么用?C++ CEikEdwin::GetTextInHBufL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEikEdwin
的用法示例。
在下文中一共展示了CEikEdwin::GetTextInHBufL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveFormDataL
TBool CVoIPForm::SaveFormDataL()
{
CVoIPAppUi* iAppUi = static_cast<CVoIPAppUi*> (iEikonEnv->EikAppUi());
CVoIPDocument* iDocument =
static_cast<CVoIPDocument*> (iAppUi->Document());
TInt iModifyIndex = iDocument->ModifyIndex();
RPointerArray<CContact> contacts = iAppUi->GetPhoneBook()->GetContactsL();
if (iModifyIndex >= 0)
{
CContact* contact = contacts[iModifyIndex];
if (contact)
{
iAppUi->GetPhoneBook()->DeleteContactItem(contact->GetEntryId());
TContactItemId contactItemId =
iAppUi->GetPhoneBook()->CreateDefaultContactItem();
contact->SetEntryId(contactItemId);
CPbkContactItem* contactItem =
iAppUi->GetPhoneBook()->OpenContactItemLCX(contactItemId);
TInt pageId = ActivePageId();
RArray<CEikCaptionedControl*> aControls;
ControlsOnPage(aControls, pageId);
for (TInt i = 0; i < aControls.Count(); i++)
{
CEikCaptionedControl* control =
((CEikCaptionedControl*) aControls[i]);
TPbkContactItemField* field = contactItem->FindField(
control->iId);
if (field == NULL)
{
CPbkFieldInfo* fieldInfo =
iAppUi->GetPhoneBook()->GetFieldsInfo().Find(
control->iId);
contactItem->AddFieldL(*fieldInfo);
field = contactItem->FindField(control->iId);
}
field->SetLabelL(control->GetFullCaptionText());
CPbkFieldInfo& fieldInfo = field->FieldInfo();
if (fieldInfo.CtrlType() == EPbkFieldCtrlTypeDateEditor)
{
CEikDateEditor* nEditor =
static_cast<CEikDateEditor*> (ControlOrNull(
control->iId));
TTime time = nEditor->Date();
field->DateTimeStorage()->SetTime(time);
}
else
{
CEikEdwin* nEditor =
static_cast<CEikEdwin*> (ControlOrNull(
control->iId));
HBufC* text = nEditor->GetTextInHBufL();
field->TextStorage()->SetText(text);
}
}
aControls.Reset();
iAppUi->GetPhoneBook()->CommitContactItem(contactItem);
CleanupStack::PopAndDestroy(2); //OpenContactItemLCX
}
}
return ETrue;
}