本文整理汇总了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();
}
示例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;
}
示例3: GetChangedComboTimeInMin
int CXTPCalendarEventRecurrenceDlg::GetChangedComboTimeInMin(CComboBox& wndCb)
{
CString strCBtext;
wndCb.GetWindowText(strCBtext);
return CXTPCalendarUtils::ParceTimeString_min(strCBtext);
}
示例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");
}
示例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);
}
示例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;
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
示例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;
}