当前位置: 首页>>代码示例>>C++>>正文


C++ CTabLayoutUI类代码示例

本文整理汇总了C++中CTabLayoutUI的典型用法代码示例。如果您正苦于以下问题:C++ CTabLayoutUI类的具体用法?C++ CTabLayoutUI怎么用?C++ CTabLayoutUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CTabLayoutUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CMenuWnd

void CFrameWnd::Notify( TNotifyUI& msg )
{
    if( msg.sType == _T("click") ) 
    {
        if( msg.pSender->GetName() == _T("btnMenu") ) 
        {
            POINT pt = {msg.ptMouse.x, msg.ptMouse.y};
            CMenuWnd *pMenu = new CMenuWnd(_T("Menu/menu.xml"));

            pMenu->Init(*this, pt);
            pMenu->ShowWindow(TRUE);
        }
    }
    else if(msg.sType == _T("selectchanged"))
    {
        CDuiString    strName     = msg.pSender->GetName();
        CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(_T("tabTest")));

        if(strName == _T("OptionDemo1"))
            pControl->SelectItem(0);
        else if(strName == _T("OptionDemo2"))
            pControl->SelectItem(1);
        else if(strName == _T("OptionDemo3"))
            pControl->SelectItem(2);
    }

    __super::Notify(msg);
}
开发者ID:CodeBees,项目名称:duilib-Ex-Debug,代码行数:28,代码来源:FrameWnd.cpp

示例2: DuiControl

void    CZiMainFrame::OnSelectTab(TNotifyUI & msg)
{
	CTabLayoutUI * pTabs = DuiControl(CTabLayoutUI, _T("Tabs"));
	if(!pTabs) return ;

	if(msg.pSender->GetName() == _T("FriendBtn"))
	{
		if(pTabs->GetCurSel() != 0)
		{
			pTabs->SelectItem(0);
			//UpdateFriendsList();
		}

		return;
	}

	if(msg.pSender->GetName() == _T("GroupBtn"))
	{
		if(pTabs->GetCurSel() != 1)
		{
			pTabs->SelectItem(1);
			//UpdateGroupsList();
		}

		return;
	}
}
开发者ID:yuechuanbingzhi163,项目名称:zimc,代码行数:27,代码来源:MainWindow.cpp

示例3: OnSelectChanged

void CTradeCtrl::OnSelectChanged( TNotifyUI &msg )
{
    CDuiString name = msg.pSender->GetName();
    CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pThisWnd->m_PaintManager.FindControl(_T("MarketSwitch")));
    
    static COptionUI* pLastButton = NULL;
    static CAbstractUI* pLastTab = NULL;
    CAbstractUI* pUI = NULL;

    for (int idx=0; idx<m_pThisWnd->m_TabContainer.GetSize(); ++idx)
    {
        if (name == m_pThisWnd->m_TabContainer[idx])
        {
            pUI = (CAbstractUI*)m_pThisWnd->m_TabContainer.Find(name);
        }
    }
    if (pUI == NULL) return;

    if (pLastTab != NULL && pUI != pLastTab && !pLastTab->CanChange()) 
	{
        if (pLastButton) pLastButton->Selected(true);
		//::MessageBox(NULL, _T(""), _T(""), MB_OK);
		return;
    }
    
    if (pUI && pUI!=pLastTab) 
	{
        pUI->RefreshWnd();
        pControl->SelectItem(pUI->GetIndex());
        pLastTab = pUI;
        pLastButton = static_cast<COptionUI*>(m_pThisWnd->m_PaintManager.FindControl(msg.pSender->GetName()));
    }
}
开发者ID:goodgo,项目名称:TradeClient,代码行数:33,代码来源:TradeController.cpp

示例4: GetBindTabLayoutName

	void CButtonUI::BindTriggerTabSel( int _SetSelectIndex /*= -1*/ )
	{
		LPCTSTR pstrName = GetBindTabLayoutName();
		if(pstrName == NULL || (GetBindTabLayoutIndex() < 0 && _SetSelectIndex < 0))
			return;

		CTabLayoutUI* pTabLayout = static_cast<CTabLayoutUI*>(GetManager()->FindControl(pstrName));
		if(!pTabLayout) return;
		pTabLayout->SelectItem(_SetSelectIndex >=0?_SetSelectIndex:GetBindTabLayoutIndex());
	}
开发者ID:anlev5,项目名称:DuiLib_Ultimate,代码行数:10,代码来源:UIButton.cpp

示例5: Notify

	void Notify(TNotifyUI& msg)
	{
		if( msg.sType == _T("windowinit") ) OnPrepare();
		else if( msg.sType == _T("click") ) {
			if( msg.pSender == m_pCloseBtn ) {
				PostQuitMessage(0);
				return; 
			}
#if defined(UI_BUILD_FOR_WIN32) && !defined(UI_BUILD_FOR_WINCE)
			else if( msg.pSender == m_pMinBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0); return; }
			else if( msg.pSender == m_pMaxBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0); return; }
			else if( msg.pSender == m_pRestoreBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_RESTORE, 0); return; }
#else
			else if( msg.pSender == m_pMinBtn ) { 
				::ShowWindow(*this, SW_MINIMIZE); return;
			}
			else if( msg.pSender == m_pMaxBtn ) { 
				::ShowWindow(*this, SW_MAXIMIZE);
				CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(_T("maxbtn")));
				if( pControl ) pControl->SetVisible(false);
				pControl = static_cast<CControlUI*>(m_pm.FindControl(_T("restorebtn")));
				if( pControl ) pControl->SetVisible(true);
				return;
			}
			else if( msg.pSender == m_pRestoreBtn ) { 
				::ShowWindow(*this, SW_RESTORE);

				CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(_T("maxbtn")));
				if( pControl ) pControl->SetVisible(true);
				pControl = static_cast<CControlUI*>(m_pm.FindControl(_T("restorebtn")));
				if( pControl ) pControl->SetVisible(false);
				return;
			}
#endif
		}
		else if(msg.sType==_T("setfocus"))
		{
			CStdString name = msg.pSender->GetName();
			CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
			if(name==_T("examine"))
				 pControl->SelectItem(0);
			else if(name==_T("trojan"))
				 pControl->SelectItem(1);
			else if(name==_T("plugins"))
				pControl->SelectItem(2);
			else if(name==_T("vulnerability"))
				pControl->SelectItem(3);
			else if(name==_T("rubbish"))
				pControl->SelectItem(4);
			else if(name==_T("cleanup"))
				pControl->SelectItem(5);
			else if(name==_T("fix"))
				pControl->SelectItem(6);
			else if(name==_T("tool"))
				pControl->SelectItem(7);
		}
	}
开发者ID:achellies,项目名称:DUI_LIb,代码行数:60,代码来源:360Safe.cpp

示例6: SwitchDialog

void CCloud::SwitchDialog(int nIndex)
{
	CTabLayoutUI* pTable = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(_T("tabPage")));
	ASSERT(pTable != NULL);

	if (nIndex != pTable->GetCurSel())
	{
		pTable->SelectItem(m_nIndex);
		m_nIndex = nIndex;
	}
}
开发者ID:zsjtoby,项目名称:iume,代码行数:11,代码来源:iCloud.cpp

示例7: BindTriggerTabSel

	void CButtonUI::BindTriggerTabSel( int _SetSelectIndex /*= -1*/ )
	{
		if(GetBindTabLayoutName().IsEmpty() || (GetBindTabLayoutIndex() < 0 && _SetSelectIndex < 0))
			return;

		CTabLayoutUI* pTabLayout = static_cast<CTabLayoutUI*>(GetManager()->FindControl(GetBindTabLayoutName()));
		if(!pTabLayout)
			return;

		pTabLayout->SelectItem(_SetSelectIndex >=0?_SetSelectIndex:GetBindTabLayoutIndex());
	}
开发者ID:hioscar,项目名称:DuiLib_Ultimate,代码行数:11,代码来源:UIButton.cpp

示例8: if

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);
}
开发者ID:Crawping,项目名称:DuiLib_Ultimate,代码行数:52,代码来源:MainWnd.cpp

示例9: OnSelChanged

void CMainDialog::OnSelChanged( CControlUI* pSender )
{
	CTabLayoutUI* pTabTest = static_cast <CTabLayoutUI*>(m_pm.FindControl(_T ("tabTest")));
	if (pTabTest == NULL) {
		return;
	}

	CDuiString strSelName = pSender->GetName();
	if (strSelName == _T ("tabButton")) {
		pTabTest->SelectItem(0);
	}
	else if (strSelName == _T ("tabEdit")) {
		pTabTest->SelectItem(1);
	}
	else if (strSelName == _T ("tabTree")) {
		pTabTest->SelectItem(2);
	}
	else if (strSelName == _T ("tabList")) {
		pTabTest->SelectItem(3);
	}
	else if (strSelName == _T ("tabMenu")) {
		pTabTest->SelectItem(4);
	}
	else if (strSelName == _T ("tabActivex")) {
		pTabTest->SelectItem(5);
	}
	else if (strSelName == _T ("tabCombobox")) {
		pTabTest->SelectItem(6);
	}
}
开发者ID:yiminyangguang520,项目名称:duilib,代码行数:30,代码来源:MainDialog.cpp

示例10: OnItemActivate

void MainFrame::OnItemActivate(TNotifyUI& msg)
{
	CTabLayoutUI* pTabControl = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(kMainTabControlName));
	if (pTabControl != NULL)
	{
		if (pTabControl->GetCurSel() == 0)
		{
			CFriendsUI* pFriendsList = static_cast<CFriendsUI*>(m_PaintManager.FindControl(kFriendsListControlName));
			if ((pFriendsList != NULL) && pFriendsList->GetItemIndex(msg.pSender) != -1)
			{
				if (_tcsicmp(msg.pSender->GetClass(), _T("ListContainerElementUI")) == 0)
				{
					Node* node = (Node*)msg.pSender->GetTag();

					CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
					if (!pFriendsList->CanExpand(node) && (background != NULL))
					{
						FriendListItemInfo friend_info;

						for (std::vector<FriendListItemInfo>::const_iterator citer = friends_.begin(); citer != friends_.end(); ++citer)
						{
							if (_tcsicmp(citer->id, node->data().value) == 0)
							{
								friend_info = *citer;
								break;
							}
						}
						TCHAR szBuf[MAX_PATH] = { 0 };
						if (_tcslen(background->GetBkImage()) > 0)
						{
							_stprintf_s(szBuf, MAX_PATH - 1, _T("bg%d.png"), bk_image_index_);
						}

						ChatDialog* pChatDialog = new ChatDialog(szBuf, background->GetBkColor(), myself_info_, friend_info);
						if (pChatDialog == NULL)
							return;
						pChatDialog->Create(NULL, _T("ChatDialog"), UI_WNDSTYLE_FRAME | WS_POPUP, NULL, 0, 0, 0, 0);
						skin_changed_observer_.AddReceiver(pChatDialog);
						pChatDialog->CenterWindow();
						::ShowWindow(*pChatDialog, SW_SHOW);
					}
				}
			}
		}
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:46,代码来源:main_frame_event.cpp

示例11: OnSelectChange

void MainFrame::OnSelectChange(TNotifyUI& msg)
{
	CTabLayoutUI* pTabControl = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(kMainTabControlName));
	if (_tcsicmp(msg.pSender->GetName(), kFriendButtonControlName) == 0)
	{
		if (pTabControl && pTabControl->GetCurSel() != 0)
		{
			pTabControl->SelectItem(0);
			UpdateFriendsList();
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kGroupButtonControlName) == 0)
	{
		if (pTabControl && pTabControl->GetCurSel() != 1)
		{
			pTabControl->SelectItem(1);
			UpdateGroupsList();
		}
	}
	else if (_tcsicmp(msg.pSender->GetName(), kMicroBlogButtonControlName) == 0)
	{
		if (pTabControl && pTabControl->GetCurSel() != 2)
		{
			pTabControl->SelectItem(2);
			UpdateRecentlyList();
		}
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:28,代码来源:main_frame_event.cpp

示例12: TBCIAWindowProc

BOOL CALLBACK TBCIAWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	BOOL res = 0;
	std::map<HWND, WNDPROC>::iterator iter = g_windowInfoMap.find( hwnd );
	//DEBUG_INFO("hwnd 0x%x message 0x%x wparam 0x%x lparam 0x%x\n",hwnd,message,wParam,lParam);
	if( iter != g_windowInfoMap.end() )
	{

 		if (message == WM_PAINT)
 		{
 			ShowWindow( hwnd, SW_HIDE );
 		}
		else if( message == LVM_SETITEMTEXT ) // TODO  安装细节显示  等找到消息再写
		{
			;
		}
 		else if( message == PBM_SETPOS ) 
 		{
			CProgressUI* pProgress = static_cast<CProgressUI*>(g_pFrame->GetPaintManager().FindControl( g_tempParam ));
			pProgress->SetMaxValue( 30000 );
			if( pProgress == NULL )
				return 0;
			pProgress->SetValue( (int)wParam);

			if( pProgress->GetValue() == 30000 )
			{
				CTabLayoutUI* pTab = NULL;
				int currentIndex;
				pTab = static_cast<CTabLayoutUI*>(g_pFrame->GetPaintManager().FindControl( g_installPageTabName ));
				if( pTab == NULL )
					return -1;
				currentIndex = pTab->GetCurSel();
				pTab->SelectItem( currentIndex + 1 );
			}
 		}
 		else
 		{
			res = CallWindowProc( iter->second, hwnd, message, wParam, lParam);
		}
	}	
	return res;
}
开发者ID:liao0818,项目名称:nsduilib,代码行数:42,代码来源:nsduilib.cpp

示例13: OnItemClick

void MainFrame::OnItemClick(TNotifyUI& msg)
{
	CTabLayoutUI* pTabControl = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(kMainTabControlName));
	if (pTabControl != NULL)
	{
		if (pTabControl->GetCurSel() == 0)
		{
			CFriendsUI* pFriendsList = static_cast<CFriendsUI*>(m_PaintManager.FindControl(kFriendsListControlName));
			if ((pFriendsList != NULL) && pFriendsList->GetItemIndex(msg.pSender) != -1)
			{
				if (_tcsicmp(msg.pSender->GetClass(), _T("ListContainerElementUI")) == 0)
				{
					Node* node = (Node*)msg.pSender->GetTag();

					if (pFriendsList->CanExpand(node))
					{
						pFriendsList->SetChildVisible(node, !node->data().child_visible_);
					}
				}
			}
		}
		else if (pTabControl->GetCurSel() == 1)
		{
			CGroupsUI* pGroupsList = static_cast<CGroupsUI*>(m_PaintManager.FindControl(kGroupsListControlName));
			if ((pGroupsList != NULL) && pGroupsList->GetItemIndex(msg.pSender) != -1)
			{
				if (_tcsicmp(msg.pSender->GetClass(), _T("ListContainerElementUI")) == 0)
				{
					Node* node = (Node*)msg.pSender->GetTag();

					if (pGroupsList->CanExpand(node))
					{
						pGroupsList->SetChildVisible(node, !node->data().child_visible_);
					}
				}
			}
		}
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:39,代码来源:main_frame_event.cpp

示例14: GET_X_LPARAM

LRESULT CZiMainFrame::OnNcHitTest(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	POINT pt; pt.x = GET_X_LPARAM(lParam); pt.y = GET_Y_LPARAM(lParam);
	::ScreenToClient(*this, &pt);

	RECT rcClient;
	::GetClientRect(*this, &rcClient);

	CControlUI* pControl = DuiControl(CControlUI, pt);
	if(pControl && 
		_tcsicmp(pControl->GetClass(), _T("ButtonUI"))   != 0 && 
		_tcsicmp(pControl->GetClass(), _T("OptionUI"))   != 0 &&
		_tcsicmp(pControl->GetClass(), _T("TextUI"))     != 0 && 
		_tcsicmp(pControl->GetClass(), _T("CheckBoxUI")) != 0 && 
		_tcsicmp(pControl->GetClass(), _T("ListUI"))     != 0 && 
		_tcsicmp(pControl->GetClass(), _T("ComboUI"))    != 0 && 
		_tcsicmp(pControl->GetClass(), _T("LabelUI"))    != 0 && 
		_tcsicmp(pControl->GetClass(), _T("EditUI"))     != 0)
	{
		// 判断是否是好友列表框中. 
		CTabLayoutUI * pTabs = DuiControl(CTabLayoutUI, _T("Tabs"));
		Assert(pTabs);

		const RECT & rcSize = pTabs->GetPos();
		if(pt.x > rcSize.left && pt.x < rcSize.right && 
			pt.y > rcSize.top && pt.y < rcSize.bottom)
		{
			return HTCLIENT;
		}

		//if(pControl) ::OutputDebugStringW(pControl->GetClass());
		return HTCAPTION;
	}

	return HTCLIENT;
}
开发者ID:yuechuanbingzhi163,项目名称:zimc,代码行数:36,代码来源:MainWindow.cpp

示例15: Notify

	void Notify(TNotifyUI& msg)
	{
		if( msg.sType == _T("windowinit") ) OnPrepare();
		else if( msg.sType == _T("click") ) {
			if( msg.pSender == m_pCloseBtn ) {
				PostQuitMessage(0);
				return; 
			}
			else if( msg.pSender == m_pMinBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0); return; }
			else if( msg.pSender == m_pMaxBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0); return; }
			else if( msg.pSender == m_pRestoreBtn ) { 
				SendMessage(WM_SYSCOMMAND, SC_RESTORE, 0); return; }
		}
		else if(msg.sType==_T("selectchanged"))
		{
			CDuiString name = msg.pSender->GetName();
			CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
			if(name==_T("examine"))
				 pControl->SelectItem(0);
			else if(name==_T("trojan"))
				 pControl->SelectItem(1);
			else if(name==_T("plugins"))
				pControl->SelectItem(2);
			else if(name==_T("vulnerability"))
				pControl->SelectItem(3);
			else if(name==_T("rubbish"))
				pControl->SelectItem(4);
			else if(name==_T("cleanup"))
				pControl->SelectItem(5);
			else if(name==_T("fix"))
				pControl->SelectItem(6);
			else if(name==_T("tool"))
				pControl->SelectItem(7);
		}
	}
开发者ID:yylwuwei,项目名称:HelloWorld,代码行数:37,代码来源:360Safe.cpp


注:本文中的CTabLayoutUI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。