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


C++ CComboBox::GetWindowText方法代码示例

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


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

示例1:

void CDlgGongShi3::OnBnClickedOk()
{
	// 公示类型
	CComboBox * pCombo = (CComboBox *)GetDlgItem(IDC_COMBO1);
	m_nClass = pCombo->GetCurSel();
	pCombo->GetWindowText(m_strGSLX);
	// 公示栏目
	pCombo = (CComboBox *)GetDlgItem(IDC_COMBO2);
	m_nGSLM = pCombo->GetCurSel();
	pCombo->GetWindowText(m_strGSLM);

	CAcUiDialog::OnOK();
}
开发者ID:fredrikjonsson,项目名称:cadof72bian,代码行数:13,代码来源:Dlg_GongShi3.cpp

示例2: GetFindText

int FindReplDlg::GetFindText(CComboBox& wnd, bsString& text)
{
	int len;
	char *tp;
	int sel = wnd.GetCurSel();
	if (sel == -1)
	{
		len = wnd.GetWindowTextLength()+1;
		tp = new char[len];
		wnd.GetWindowText(tp, len);
		sel = wnd.FindStringExact(-1, tp);
		if (sel == -1)
		{
			sel = wnd.InsertString(0, tp);
			wnd.SetCurSel(sel);
		}
		int cnt;
		while ((cnt = wnd.GetCount()) >= 20)
			wnd.DeleteString(cnt-1);
	}
	else
	{
		len = wnd.GetLBTextLen(sel)+1;
		tp = new char[len];
		wnd.GetLBText(sel, tp);
	}
	text.Attach(tp);
	return sel;
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:29,代码来源:FindReplDlg.cpp

示例3: GetChangedComboTimeInMin

int CXTPCalendarEventRecurrenceDlg::GetChangedComboTimeInMin(CComboBox& wndCb)
{
	CString strCBtext;
	wndCb.GetWindowText(strCBtext);

	return CXTPCalendarUtils::ParceTimeString_min(strCBtext);
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:7,代码来源:XTPCalendarEventRecurrenceDlg.cpp

示例4: OnBnClickedButconn

void CfsclientwDlg::OnBnClickedButconn()
{
	//m_logoWin.setImage(icon_doing);
	//m_logoWin.refresh();
	m_gifWin.setText("...");
	m_gifWin.refresh();
	//Sleep(100000);
	CComboBox * pcb = (CComboBox*)GetDlgItem(IDC_COMBOSRV);
	CString cstr;
	pcb->GetWindowText(cstr);
	if (cstr == "")
	{
		MessageBox("please select or input a server", "error");
		return;
	}
	if (m_dwM->connectServer(cstr.GetBuffer()) < 0)
	{
		MessageBox("failed to connect this server", "error");
		return;
	}

	dir("/home");
	enableButton("server",   false);
	enableButton("download", true);
	enableButton("connect",  false);
	//Sleep(3000);
	//m_logoWin.setImage(icon_ok);
	m_gifWin.setText("ok");
}
开发者ID:simon-rock,项目名称:workspace_other,代码行数:29,代码来源:fsclientwDlg.cpp

示例5: OnCommand

BOOL CFileDialogEx::OnCommand( WPARAM wParam, LPARAM lParam )
{
	if (HIWORD (wParam) == CBN_SELCHANGE)
	{
		if (LOWORD (wParam) == IDC_DIRLIST)
		{
			// The combo box
			CString text;
			CComboBox combo;
			combo.Attach (::GetDlgItem (*this, IDC_DIRLIST));
			combo.GetWindowText (text);
			combo.Detach ();

			// Set the new directory			
			TCHAR s[MAX_PATH];

			// Backup contents of 'edt1'
			HWND parent = *GetParent ();
			::GetDlgItemText (parent, edt1, s, MAX_PATH);
			
			// Replace with the directory name
			::SendMessage (parent, CDM_SETCONTROLTEXT, edt1, (LPARAM)(const char*)text);
			
			// Click on the OK button
			::SendMessage (parent, WM_COMMAND, IDOK, 0);
			
			// Restore contents of 'edt1'
			::SendMessage (parent, CDM_SETCONTROLTEXT, edt1, (LPARAM)s);
		}
	}
	return CFileDialog::OnCommand (wParam, lParam);
}
开发者ID:Kiddinglife,项目名称:ryzom,代码行数:32,代码来源:file_dialog_ex.cpp

示例6: GetStyleName

//gets the text from the style dropdown
CString CPropPageOptionsControls::GetStyleName()
{
	//first off get the text of the dropdown
	CComboBox* pCombo = (CComboBox*)GetDlgItem(IDC_COMBO_PRESET_STYLES);

	CString sStyle;
	pCombo->GetWindowText(sStyle);

	return sStyle;
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:11,代码来源:PropPageOptionsControls.cpp

示例7: OnDropDown

void CMainFrame::OnDropDown()
{
	CString FileName;
	CMFCToolBarComboBoxButton* pComboButton = (CMFCToolBarComboBoxButton*) m_wndLoadFileBar.GetButton(1);
	CComboBox* pLoadFile = pComboButton->GetComboBox();

	pLoadFile->GetWindowText(FileName);
	pLoadFile->ResetContent();
	pLoadFile->Dir(DDL_READWRITE,"*.*");
	pLoadFile->SetWindowText(FileName);
}
开发者ID:skappert,项目名称:mcp,代码行数:11,代码来源:MainFrm.cpp

示例8: OnBnClickedPreview

void SettingsDlg::OnBnClickedPreview()
{
	CComboBox *combobox;
	combobox = (CComboBox*)GetDlgItem(IDC_VID_CAP_DEV);
	CString name;
	combobox->GetWindowText(name);
	if (!microsipDlg->previewWin) {
		microsipDlg->previewWin = new Preview(microsipDlg);
	}
	microsipDlg->previewWin->Start(microsipDlg->VideoCaptureDeviceId(name));
}
开发者ID:tech-thinking,项目名称:Ksip,代码行数:11,代码来源:SettingsDlg.cpp

示例9: OnCbnSelchangeFont

//widget event handlers
void TextStyleDialog::OnCbnSelchangeFont()
{
	CWnd* cwnd = this->GetFocus();
	CComboBox* p = (CComboBox*)GetDlgItem(IDC_FONT);
	int sel = p->GetCurSel();
TRACE("SEL: %d", sel);
	CString tmp;
	p->GetWindowText(tmp);
	p->GetLBText(sel, tmp);
TRACE(tmp);
	triggerVirtualKeyStroke(p);
}
开发者ID:daisy,项目名称:amis,代码行数:13,代码来源:TextStyleDialog.cpp

示例10: GetLogClass

UINT CLogClassFilterEditDlg::GetLogClass(int comboID)
{
	CComboBox combo = (HWND)GetDlgItem(comboID);
	int index = combo.GetCurSel();
	if (index >= 0)
	{
		return combo.GetItemData(index);
	}

	CStringW text;
	combo.GetWindowText(text);
	return wcstoul(text, NULL, 10);
}
开发者ID:timepp,项目名称:tplog,代码行数:13,代码来源:concretefiltereditdlg.cpp

示例11: GetTick

DWORD NetCfg::GetTick()
{
	CComboBox *hCombo;
	CString strout;
	DWORD val;
	char *pbuf;

	hCombo = (CComboBox*)GetDlgItem(IDC_COMBO_TICK);
	hCombo->GetWindowText(strout);
	pbuf = strout.GetBuffer();
	val = atoi(pbuf);
	return val;
}
开发者ID:MenglongWu,项目名称:NetStrong,代码行数:13,代码来源:NetCfg.cpp

示例12: OnOK

void CNewSvrDlg::OnOK()
{
	// TODO: 在此添加专用代码和/或调用基类
	UpdateData(TRUE);
	CComboBox *pBox =(CComboBox *) GetDlgItem(IDC_COMBO_HOST_IP);
	ASSERT(pBox);
	if(pBox)
	{	 
		pBox->GetWindowText(m_szLocalIp);
//		m_dwLocalIp = htonl( inet_addr(CW2A(szIp)));
	}


	CBCGPDialog::OnOK();
}
开发者ID:samkrew,项目名称:nxp-lpc,代码行数:15,代码来源:NewSvrDlg.cpp

示例13: OnSelchangePlist

void CModuleDialog::OnSelchangePlist() 
{
	CComboBox *lb; 
	CString s; 
	char Buf[256]; 
	DWORD idProcess; 

	lb = (CComboBox *)GetDlgItem(IDC_PLIST); 
	lb->GetWindowText(Buf, 255); 

	idProcess = strtoul((LPCTSTR)Buf, NULL, 16); 

	// TODO: Add your control notification handler code here
	GetModuleList((CListBox *)GetDlgItem(IDC_MLIST), idProcess); 
}
开发者ID:Execsl,项目名称:usnap,代码行数:15,代码来源:ModuleDialog.cpp

示例14: GetOutputFileName

//=================================================
// Helper Functions
//=================================================
CString CMainDlg::GetOutputFileName()
{
	CString strFile = _T("");
	
	GetControlValues();

	switch(m_iNamingOpt) 
	{
		case 0: // Use entered prefix
		{
			strFile = m_strImageName;
			break;
		}
		case 1: // Always ask for prefix
		{
			CGetDataDlg dlg;
			dlg.SetTitle(_T("Enter File Prefix"));
			if(dlg.DoModal() == IDOK)
				strFile = dlg.GetData();
			break;
		}
		case 2: // No prefix
			break;
	}
	if(strFile.GetLength() > 0)
		strFile += _T("_");

	// Add time stamp
	COleDateTime dtNow = COleDateTime::GetCurrentTime();
	CString strDT = dtNow.Format(_T("%d-%m-%y_%H-%M-%S"));
	strFile += strDT;

	// Add file extension
	//strFile += _T(".jpg");
	CComboBox* pCombo = NULL;
	VERIFY(pCombo = (CComboBox*)GetDlgItem(IDC_IMAGE_EXT));
    strFile += _T(".");
	CString strExt = _T("");
	pCombo->GetWindowText(strExt);
	strFile += strExt;

	return strFile;
}
开发者ID:ohosrry,项目名称:wtldemo,代码行数:46,代码来源:MainDlg.cpp

示例15: OnBnConnect

LRESULT CLoginDlg::OnBnConnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	// TODO: Add your control notification handler code here
	if(GetFramework()->IsConnected())
	{
		GetFramework()->Disconnect();
		GetDlgItem(IDC_BUTTON4).SetWindowText(L"Connect");
		GetDlgItem(IDC_APPID).EnableWindow(TRUE);
		GetDlgItem(IDC_SUBID).EnableWindow(TRUE);
		GetDlgItem(IDC_COMBO1).EnableWindow(TRUE);
	}
	else
	{
		CComboBox box = GetDlgItem(IDC_COMBO1);
		BSTR text = NULL;
		box.GetWindowText(text);
		if(text == NULL)
		{
			AtlMessageBox(m_hWnd, L"Please select a interface server!");
			return 0;
		}
		box = GetDlgItem(IDC_APPID);
		int AppID = box.GetCurSel();
		box = GetDlgItem(IDC_SUBID);
		int SubID = box.GetCurSel();
		GetFramework()->SetAppInfo(AppID, SubID,1,1);
		if(CString(L"auto") != text)
		{
			GetFramework()->SetISAddress(ClientCommon::StrToAddress(text));
		}
		GetProcessor()->ConnectToIS();
		GetDlgItem(IDC_BUTTON4).EnableWindow(FALSE);
	}
	

	return 0;
}
开发者ID:bahamut8348,项目名称:xkcode,代码行数:37,代码来源:LoginDlg.cpp


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