本文整理汇总了C++中COptionUI::GetUserData方法的典型用法代码示例。如果您正苦于以下问题:C++ COptionUI::GetUserData方法的具体用法?C++ COptionUI::GetUserData怎么用?C++ COptionUI::GetUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COptionUI
的用法示例。
在下文中一共展示了COptionUI::GetUserData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Notify
void CMainWnd::Notify( TNotifyUI &msg )
{
if(msg.sType.CompareNoCase(DUI_MSGTYPE_SCROLL) == 0)
{
CVerticalLayoutUI* pTabPanel = (CVerticalLayoutUI*)msg.pSender;
CString sName = msg.pSender->GetName();
int nPage = (int)msg.wParam;
CString sTabPanel = sName;
int nIdx = sTabPanel.Find(_T("@"));
if(nIdx == -1) return;
CString sType = sTabPanel.Mid(nIdx + 1);
if(nPage < 1) nPage = 1;
if(nPage > 200) nPage = 200;
int nScrollPos = (nPage - 1) * pTabPanel->GetVerticalScrollBar()->GetLineSize();
SIZE szSize = {0, nScrollPos};
pTabPanel->SetScrollPos(szSize, false);
m_Data.LoadBizhi(sType, nPage, 10);
}
else if(msg.sType.CompareNoCase(DUI_MSGTYPE_SELECTCHANGED) == 0)
{
COptionUI* pTabBtn = (COptionUI*)msg.pSender;
CTabLayoutUI* pTabLayout = (CTabLayoutUI*)m_PaintManager.FindControl(_T("wp_tablayout"));
CString sName = pTabBtn->GetName();
if(sName == _T("wp_tabbtn") && pTabLayout)
{
CString sType = pTabBtn->GetUserData();
CString sTabPanel;
sTabPanel.Format(_T("[email protected]%s"), sType);
CVerticalLayoutUI* pTabPanel = (CVerticalLayoutUI*)m_PaintManager.FindControl(sTabPanel);
if(pTabPanel == NULL)
{
m_Data.LoadBizhi(sType, 1, 10);
}
else
{
pTabLayout->SelectItem(pTabPanel);
}
}
}
else if(msg.sType.CompareNoCase(DUI_MSGTYPE_CLICK_WPFAV) == 0)
{
MessageBox(NULL, _T("收藏成功"), _T("百度壁纸 - 提示"), MB_OK);
}
else if(msg.sType.CompareNoCase(DUI_MSGTYPE_CLICK_WPSET) == 0)
{
CWPButton* pWPBtn = (CWPButton*)msg.pSender;
pWPBtn->SetWP();
}
return WindowImplBase::Notify(msg);
}
示例2: DeleteFileItem
void CDuiFrameWnd::DeleteFileItem()
{
COptionUI* pOption = NULL;
CVerticalLayoutUI* pLayout = (CVerticalLayoutUI*)m_PaintManager.FindControl(_T("playlist"));
int nIndex = pLayout->GetCount();
for (int i = 0; i < nIndex;i++)
{
pOption = (COptionUI*)pLayout->GetItemAt(i);
if (pOption->IsSelected())
{
CDuiString strPath = pOption->GetUserData();
m_cPlayList.deleteFile(strPath.GetData());
pLayout->RemoveAt(i);
break;
}
}
}