本文整理汇总了C++中Header::SetButton方法的典型用法代码示例。如果您正苦于以下问题:C++ Header::SetButton方法的具体用法?C++ Header::SetButton怎么用?C++ Header::SetButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Header
的用法示例。
在下文中一共展示了Header::SetButton方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareHeader
void BaseWordForm::PrepareHeader()
{
Header *header = GetHeader();
if (header)
{
if (!__pICHeader)
__pICHeader = Utils::GetBitmapN("ic_header.png");
header->SetTitleIcon(__pICHeader);
header->RemoveAllButtons();
header->RemoveAllItems();
if (__pContextMenu)
{
ButtonItem btnMenu;
btnMenu.Construct(BUTTON_ITEM_STYLE_ICON, ID_MENU);
btnMenu.SetIcon(BUTTON_ITEM_STATUS_NORMAL, Utils::GetBitmapN(L"ic_menu.png"));
header->SetButton(BUTTON_POSITION_RIGHT, btnMenu);
}
// ButtonItem btnAddWord;
// btnAddWord.Construct(BUTTON_ITEM_STYLE_ICON, ID_ADD_WORD);
// //btnAddWord.SetText(GetString("IDS_ADD_WORD_BUTTON"));
// btnAddWord.SetIcon(BUTTON_ITEM_STATUS_NORMAL, Utils::GetBitmap(L"ic_add_word.png"));
// HeaderItem headerItem1;
// header->SetTitleText("voc4u");
// header->SetButton(BUTTON_POSITION_RIGHT, btnAddWord);
// header->PlayWaitingAnimation(HEADER_ANIMATION_POSITION_BUTTON_LEFT);
header->SetTitleText("Voc4u");
header->AddActionEventListener(*this);
}
}
示例2: UpdateState
void BMCategoriesForm::UpdateState()
{
ListView * pList = static_cast<ListView *>(GetControl(IDC_LISTVIEW, true));
pList->UpdateList();
Header* pHeader = GetHeader();
ButtonItem buttonItem;
buttonItem.Construct(BUTTON_ITEM_STYLE_TEXT, ID_EDIT);
buttonItem.SetText(m_bEditState ? GetString(IDS_DONE): GetString(IDS_EDIT));
pHeader->SetButton(BUTTON_POSITION_RIGHT, buttonItem);
Invalidate(true);
}
示例3: GetHeader
result
UserProfileForm::OnInitializing(void)
{
BaseForm::OnInitializing();
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
__pLeftItemBitmap = pAppResource->GetBitmapN(L"facebook_icon1.png");
ButtonItem buttonLeftItem;
buttonLeftItem.Construct(BUTTON_ITEM_STYLE_ICON,NULL);
buttonLeftItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pLeftItemBitmap);
Header* pHeader = GetHeader();
pHeader->SetStyle(HEADER_STYLE_TITLE);
pHeader->SetButton(BUTTON_POSITION_LEFT, buttonLeftItem);
pHeader->SetTitleText(L"Your Profile Page");
result r = E_SUCCESS;
//Read Access Token
Registry reg;
r = reg.Construct(L"/Home/FacebookReg.ini", false );
String token;
String section = L"Facebook";
String entry = L"AccessToken";
r = reg.GetValue(section, entry , token);
if(r == E_SUCCESS)
AppLog("token is %ls",token.GetPointer());
else
AppLog("Reading failed: %s", GetErrorMessage(r));
__accessToken =token;
String profileurl;
profileurl.Append(L"https://graph.facebook.com/me?");
profileurl.Append(L"access_token=");
profileurl.Append(__accessToken);
SendRequestGet(profileurl);
return r;
}