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


C++ COptionUI::IsSelected方法代码示例

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


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

示例1: GetData

void CLoginWnd::GetData()
{
	CEditUI* pAccount = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("account")));
	m_strAccount = pAccount->GetText();
	CEditUI* pWord = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("password")));
	m_strPassWord = pWord->GetText();
	COptionUI* pLeft = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("remember")));
	m_IsLeftSelected = pLeft->IsSelected();
	COptionUI* pRight = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("autolog")));
	m_IsRightSeleced = pRight->IsSelected();
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:11,代码来源:LoginWnd.cpp

示例2: Notify

void CLoginWnd::Notify(TNotifyUI& msg)
{
	if (msg.sType ==DUI_MSGTYPE_CLICK)
	{
		CDuiString str = msg.pSender->GetName();
		if ( str == _T("configbtn"))
		{
			CConfigWnd* pConfig = new CConfigWnd;
			pConfig->Create(NULL,_T("服务器配置"),UI_WNDSTYLE_FRAME,WS_EX_WINDOWEDGE);
			pConfig->CenterWindow();
			pConfig->ShowModal();
			delete pConfig;
		}
		else if ( str == _T("login"))
		{
			Login();
		}

	}
	if (msg.sType == DUI_MSGTYPE_SELECTCHANGED)
	{
		if (msg.pSender->GetName()==_T("autolog"))
		{
			COptionUI* pLeft = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("remember")));
			COptionUI* pRight = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("autolog")));
			if (!pLeft->IsSelected())
			{
				pLeft->Selected(true);
			}
		}
	}
	return WindowImplBase::Notify(msg);
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:33,代码来源:LoginWnd.cpp

示例3: 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;
		}

	}


}
开发者ID:jzxyouok,项目名称:libvlc-xfplay,代码行数:21,代码来源:DuiFrameWnd.cpp

示例4: Notify


//.........这里部分代码省略.........
			CFrameBusinessData::Instance()->setProjectItem(pData);
		}
	}
	else if (msg.pSender->GetName() == "btn_bussiness_chat")
	{
		sProjectItem* pData = (sProjectItem*)msg.pSender->GetParent()->GetParent()->GetParent()->GetTag();
		if (NULL != pData)
		{
			//没有创建房间,就需要重新选人。
			if (pData->strRoomID.empty())
			{
				
				CAddNewGroupMember* pAddGroupMemWnd = new CAddNewGroupMember(m_PaintManager);
				if (NULL != pAddGroupMemWnd)
				{
					pAddGroupMemWnd->SetShowMode(true);
					pAddGroupMemWnd->CreateWnd();
					pAddGroupMemWnd->Initialize();//初始化一次。
				}
				
				//bool bWithProperty = m_pComboResProperty->GetCurSel() == 1;
				pAddGroupMemWnd->SetResProperty(false, pData->strProjID, pData->strProjName);
				pAddGroupMemWnd->ShowWindow(true);
			}
			else
			{
				//我有可能不是这个群里面的成员,就需要判断下。如果我不是这个群里面的人,就不能进去。
				tstring strMyPhone = CController::Instance()->GetXmppClient()->jid().username();
				tstring strMyAccount = strMyPhone+MMPC_ACCOUNT;
				if(CController::Instance()->GetRoomManager()->IsInThisRoom(pData->strRoomID, strMyAccount ))
				{
					CController::Instance()->GetRoomManager()->EnterRoom(pData->strRoomID, strMyPhone);
					if (pData->strDestOrgID.empty() && pData->strDestOrgName.empty())
					{
						if (pData->vecDestParticipants.size()>0)
						{
							mainDlg::getInstance()->OnShowGroupChatWnd_Personal(pData->vecDestParticipants[0], pData->strRoomID);
						}
					}
					else
					{
						mainDlg::getInstance()->OnShowGroupChatWnd(pData->strDestOrgID, pData->strDestOrgName, pData->strRoomID);
					}
				}
				else
				{
					CMsgBox* pMsgBox = new CMsgBox("错误","您不是该群组成员!");
					pMsgBox->ShowModal();
				}
			}
			
		}		
	}	
	//增加搜索功能 by HQ 20160519
	else if (msg.pSender->GetName() == "btn_Search")
	{	
		COptionUI* OptionToday = static_cast<COptionUI*>(m_PaintManager->FindControl("OptionToday"));
		COptionUI* OptionWeek = static_cast<COptionUI*>(m_PaintManager->FindControl("OptionWeek"));
		COptionUI* OptionMonth = static_cast<COptionUI*>(m_PaintManager->FindControl("OptionMonth"));
		COptionUI* OptionAll = static_cast<COptionUI*>(m_PaintManager->FindControl("OptionAll"));

		tstring sSelectedTime=(_T(""));
		if (OptionToday->IsSelected())
		{
			time_t tToday = time(0);
			sSelectedTime = GetYMDTimeString(tToday);
		}
		else if (OptionWeek->IsSelected())
		{
			time_t tToday = time(0);
			time_t tOneWeekAgo = tToday - const_one_week_seconds;
			sSelectedTime = GetYMDTimeString(tOneWeekAgo);
		}
		else if (OptionMonth->IsSelected())
		{
			time_t tToday = time(0);
			time_t tOneMonthAgo = tToday - const_one_month_seconds;
			sSelectedTime = GetYMDTimeString(tOneMonthAgo);
		}
		else if (OptionAll->IsSelected())
		{
			//do nothing...
		}

		CEditUI* edtSearchString = static_cast<CEditUI*>(m_PaintManager->FindControl("edt_SearchString"));
		tstring sSearchString = edtSearchString->GetText();

		//允许空字符串查询 by HQ 20160519
		//if(sSearchString == "")
		//{
		//	CMsgBox* pMsgBox = new CMsgBox("错误","请输入查找条件!");
		//	pMsgBox->ShowModal();
		//	edtSearchString->SetFocus();
		//}
		//else
		//{
			FetchProjects(sSelectedTime,sSearchString);
		//}
	}	
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:101,代码来源:ProjectsListPage.cpp

示例5: TBCIASendMessage

NSDUILIB_API void  TBCIASendMessage(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
	HWND hwnd = (HWND)popint();
	TCHAR msgID[MAX_PATH];
	TCHAR wParam[MAX_PATH];
	TCHAR lParam[MAX_PATH];

	EXDLL_INIT();

 	ZeroMemory(msgID, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(wParam, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(lParam, MAX_PATH*sizeof(TCHAR));

	DEBUG_INFO("to send message stringsize %d MAX_PATH %d\n",g_stringsize,MAX_PATH);
	popstring( msgID,sizeof(msgID) );
	popstring( wParam,sizeof(wParam) );
	popstring( lParam ,sizeof(lParam));

	if( _tcsicmp( msgID, _T("WM_TBCIAMIN")) == 0 )
		::SendMessage( hwnd, WM_TBCIAMIN, (WPARAM)wParam, (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIACLOSE")) == 0 )
		::SendMessage( hwnd, WM_TBCIACLOSE, (WPARAM)wParam, (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIABACK")) == 0 )
		::SendMessage( hwnd, WM_TBCIABACK, (WPARAM)g_installPageTabName.GetData(), (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIANEXT")) == 0 )
		::SendMessage( hwnd, WM_TBCIANEXT, (WPARAM)g_installPageTabName.GetData(), (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIACANCEL")) == 0 )
	{
		LPCTSTR lpTitle = (LPCTSTR)wParam;
		LPCTSTR lpText = (LPCTSTR)lParam;
		DEBUG_BUFFER_FMT(lpTitle,_tcslen(lpTitle) + sizeof(TCHAR),"lpTitle :");
		DEBUG_BUFFER_FMT(lpText,_tcslen(lpText) + sizeof(TCHAR),"lpText :");
		if( IDYES == MessageBox( hwnd, lpText, lpTitle, MB_YESNO)/*TBCIAMessageBox( hwnd, lpTitle, lpText )*/)
		{
			pushint( 0 );
			::SendMessage( hwnd, WM_TBCIACLOSE, (WPARAM)wParam, (LPARAM)lParam );
		}
		else
			pushint( -1 );
	}
	else if (_tcsicmp( msgID, _T("WM_QAUERYCANCEL")) == 0)
	{
		LPCTSTR lpTitle = (LPCTSTR)wParam;
		LPCTSTR lpText = (LPCTSTR)lParam;
		if( IDYES == MessageBox( hwnd, lpText, lpTitle, MB_YESNO)/*TBCIAMessageBox( hwnd, lpTitle, lpText )*/)
		{
			pushint( 0 );
		}
		else
			pushint( -1 );
	}
	else if( _tcsicmp( msgID, _T("WM_TBCIASTARTINSTALL")) == 0 )
	{
		::SendMessage( hwnd, WM_TBCIASTARTINSTALL, (WPARAM)g_installPageTabName.GetData(), (LPARAM)lParam );
	}
	else if( _tcsicmp( msgID, _T("WM_TBCIASTARTUNINSTALL")) == 0 )
		::SendMessage( hwnd, WM_TBCIASTARTUNINSTALL, (WPARAM)g_installPageTabName.GetData(), (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIAFINISHEDINSTALL")) == 0 )
		::SendMessage( hwnd, WM_TBCIAFINISHEDINSTALL, (WPARAM)wParam, (LPARAM)lParam );
	else if( _tcsicmp( msgID, _T("WM_TBCIAOPTIONSTATE")) == 0 ) // 返回option的状态
	{
		COptionUI* pOption = static_cast<COptionUI*>(g_pFrame->GetPaintManager().FindControl( wParam ));
		if( pOption == NULL )
			return;
		DEBUG_INFO("selected %s\n",pOption->IsSelected() ? "yes" : "no");
		pushint(  pOption->IsSelected() );
	}
	else if (_tcsicmp( msgID, _T("WM_TBCIASETSTATE")) == 0)
	{
		COptionUI* pOption = static_cast<COptionUI*>(g_pFrame->GetPaintManager().FindControl( wParam ));
		if( pOption == NULL )
			return;
		if (_tcsicmp(lParam,_T("1"))== 0)
		{
			pOption->Selected(true);
		}
		else
		{
			pOption->Selected(false);
		}
		DEBUG_INFO("selected %s\n",pOption->IsSelected() ? "yes" : "no");
		pOption->PaintStatusImage(g_pFrame->GetPaintManager().GetPaintDC());
		pushint(  pOption->IsSelected() );
	}
	else if (_tcsicmp(msgID,_T("WM_TBCIAEXIT"))==0)
	{
		::SendMessage(hwnd,WM_CLOSE,0,0);
	}
	else if( _tcsicmp( msgID, _T("WM_TBCIAOPENURL")) == 0 )
	{
		CDuiString url = (CDuiString)wParam;
		if( url.Find( _T("https://") ) == -1  &&
			url.Find(_T("http://")) == -1)
		{
			pushstring( _T("url error") );
			return;
		}
		CDuiString lpCmdLine = _T("explorer \"");
		lpCmdLine += url;
		lpCmdLine += _T("\"");
//.........这里部分代码省略.........
开发者ID:liao0818,项目名称:nsduilib,代码行数:101,代码来源:nsduilib.cpp

示例6: Notify

void MainFrame::Notify(TNotifyUI& msg)
{
	if (_tcsicmp(msg.sType, kWindowInit) == 0)
	{
		OnPrepare(msg);
	}
	else if (_tcsicmp(msg.sType, kClick) == 0)
	{
		if (_tcsicmp(msg.pSender->GetName(), kCloseButtonControlName) == 0 || _tcsicmp(msg.pSender->GetName(), kCancelButtonControlName) == 0)
		{
			OnExit(msg);
		}
		else if (_tcsicmp(msg.pSender->GetName(), kMinButtonControlName) == 0)
		{
#if defined(UNDER_CE)
			::ShowWindow(m_hWnd, SW_MINIMIZE);
#else
			SendMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0);
#endif
		}
		else if (_tcsicmp(msg.pSender->GetName(), kMaxButtonControlName) == 0)
		{
#if defined(UNDER_CE)
			::ShowWindow(m_hWnd, SW_MAXIMIZE);
			CControlUI* pControl = static_cast<CControlUI*>(paint_manager_.FindControl(kMaxButtonControlName));
			if( pControl ) pControl->SetVisible(false);
			pControl = static_cast<CControlUI*>(paint_manager_.FindControl(kRestoreButtonControlName));
			if( pControl ) pControl->SetVisible(true);
#else
			SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0);
#endif
		}
		else if (_tcsicmp(msg.pSender->GetName(), kRestoreButtonControlName) == 0)
		{
#if defined(UNDER_CE)
			::ShowWindow(m_hWnd, SW_RESTORE);
			CControlUI* pControl = static_cast<CControlUI*>(paint_manager_.FindControl(kMaxButtonControlName));
			if( pControl ) pControl->SetVisible(true);
			pControl = static_cast<CControlUI*>(paint_manager_.FindControl(kRestoreButtonControlName));
			if( pControl ) pControl->SetVisible(false);
#else
			SendMessage(WM_SYSCOMMAND, SC_RESTORE, 0);
#endif
		}
		else if (_tcsicmp(msg.pSender->GetName(), _T("select_all_btn")) == 0)
		{
			CContainerUI* pDriverList = static_cast<CContainerUI*>(paint_manager_.FindControl(_T("driver_list")));
			for (int i = 0; (pDriverList != NULL) && (i < pDriverList->GetCount()); ++i)
			{
				COptionUI* pDriver = static_cast<COptionUI*>(pDriverList->GetItemAt(i)->GetInterface(_T("Option")));
				if (pDriver != NULL)
					pDriver->Selected(true);
			}
		}
		else if (_tcsicmp(msg.pSender->GetName(), _T("uninstall_btn")) == 0)
		{
			vector<tString> deleted_printer_driver;
			DWORD dwError = 0;
			TCHAR szBuf[MAX_PATH] = {0};

			CContainerUI* pDriverList = static_cast<CContainerUI*>(paint_manager_.FindControl(_T("driver_list")));
			for (int i = 0; (pDriverList != NULL) && (i < pDriverList->GetCount()); ++i)
			{
				COptionUI* pDriver = static_cast<COptionUI*>(pDriverList->GetItemAt(i)->GetInterface(_T("Option")));
				if ((pDriver != NULL) && pDriver->IsSelected())
				{
					// 涉及到的API: DeletePrinter DeletePrinterDriver
					HANDLE hPrinter = NULL;
					_stprintf_s(szBuf, MAX_PATH - 1, pDriver->GetText().GetData());
					PRINTER_DEFAULTS PrtDefault = {NULL, NULL, PRINTER_ALL_ACCESS};
					OpenPrinter(szBuf, &hPrinter, &PrtDefault);
					if (hPrinter != NULL)
					{
						DWORD dwNeeded = 0;
						GetPrinter(hPrinter, 2, NULL, 0, &dwNeeded);
						LPBYTE lpBuffer = (LPBYTE)malloc(dwNeeded);
						if (lpBuffer != NULL)
						{
							GetPrinter(hPrinter, 2, lpBuffer, dwNeeded, &dwNeeded);

							DeletePrinter(hPrinter);

							dwError = GetLastError();

							vector<tString>::const_iterator citer = find(deleted_printer_driver.begin(), deleted_printer_driver.end(), ((PRINTER_INFO_2*)lpBuffer)->pDriverName);
							if (citer == deleted_printer_driver.end())
							{
								deleted_printer_driver.push_back(((PRINTER_INFO_2*)lpBuffer)->pDriverName);
							}

							ClosePrinter(hPrinter);
							free(lpBuffer);
						}
					}
				}
			}
			for (vector<tString>::const_iterator citer = deleted_printer_driver.begin(); citer != deleted_printer_driver.end(); ++citer)
			{
				_stprintf_s(szBuf, MAX_PATH - 1, citer->c_str());
				DeletePrinterDriver(NULL, NULL, szBuf);
//.........这里部分代码省略.........
开发者ID:corytodd,项目名称:WindowsPrinterDriver,代码行数:101,代码来源:main_frame.cpp


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