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


C++ GotoDlgCtrl函数代码示例

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


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

示例1: MyDevice

/*****************************************************************************
** Procedure:  CLinePropPage::OnKillActive
**
** Arguments: void
**
** Returns:    TRUE/FALSE if page switch is ok
**
** Description: Called by the framework when this page is being destroyed
**
*****************************************************************************/
BOOL CLinePropPage::OnKillActive() 
{
	CTSPUIDevice* pDevice = MyDevice();

	// Validate our control data
	if (UpdateData(TRUE))
	{
		int iType = m_iType+1;

		// Validate the extension.
		if (iType == CTSPUILineConnection::Trunk || 
			iType == CTSPUILineConnection::PredictiveDialer)
		{
			if (m_dwExtension == 0 || m_dwExtension > 999)
			{
				AfxMessageBox(IDS_BADTRUNKDIALER);
				GotoDlgCtrl(&m_edtExtension);
				return FALSE;
			}
		}
		else if (iType == CTSPUILineConnection::Queue)
		{
			if (m_dwExtension < 8999)
			{
				AfxMessageBox(IDS_BADQUEUE);
				GotoDlgCtrl(&m_edtExtension);
				return FALSE;
			}
		}
		else // Station, VRU, Route Point
		{
			if (m_dwExtension < 1000 || m_dwExtension > 8999)
			{
				AfxMessageBox(IDS_BADSTATION);
				GotoDlgCtrl(&m_edtExtension);
				return FALSE;
			}
		}

		// Make sure it doesn't exist.
		if (!m_fExisting && pDevice->FindLineConnectionByPermanentID(m_dwExtension) != NULL)
		{
			AfxMessageBox(IDS_LINEEXISTS);
			GotoDlgCtrl(&m_edtExtension);
			return FALSE;
		}

		if (m_strName.IsEmpty())
		{
			AfxMessageBox(IDS_BADLINENAME);
			GotoDlgCtrl(GetDlgItem(IDC_LINE_NAME));
			return FALSE;
		}
	}

	// Everythings ok, adjust the type
	m_iType++;
	return CPropertyPage::OnKillActive();

}// CLinePropPage::OnKillActive
开发者ID:junction,项目名称:jn-tapi,代码行数:70,代码来源:properties.cpp

示例2: Input

/******************************************************************************
 Function Name  :   OnOK

 Description    :   Called by the framework when the user clicks the OK button
                    (the button with an ID of IDOK)
 Input(s)       :   -
 Output         :   -
 Functionality  :   Invokes confirmation for a new message entry or
                    modification of a existing one.
 Member of      :   CMsgIDAttr

 Author(s)      :   Ratnadip Choudhury
 Date Created   :   19-03-2002
******************************************************************************/
void CMsgIDAttr::OnOK()
{
    UpdateData(TRUE);

    m_nID = (UINT)m_odCanIDVal.lGetValue();
    m_omStrMsg.TrimLeft();
    m_omStrMsg.TrimRight();

    UpdateData(FALSE);

    int nResult = 0;
    if (m_odCanIDVal.LineLength() == 0)
    {
        AfxMessageBox(_("Invalid Message ID"));
        GotoDlgCtrl(GetDlgItem(IDC_EDIT_CANID_VAL));
        nResult = -1;

    }
    if (m_bForEdit == false)
    {
        if (nResult == 0)
        {
            nResult = CMessageAttrib::ouGetHandle(m_eBusType).nValidateNewID(m_nID);
            if (nResult < 0)
            {
                AfxMessageBox(_("Duplicate Message ID"));
                GotoDlgCtrl(GetDlgItem(IDC_EDIT_CANID_VAL));
            }
        }
    }
    else        //if the id is changed then validication is required
    {
        if(m_nID != m_nPreviousID)      //if the id is not changed then skip
        {
            if (nResult == 0)
            {
                nResult = CMessageAttrib::ouGetHandle(m_eBusType).nValidateNewID(m_nID);
                if (nResult < 0)
                {
                    AfxMessageBox("Duplicate Message ID");
                    GotoDlgCtrl(GetDlgItem(IDC_EDIT_CANID_VAL));
                }
            }
        }
    }
    if (nResult >= 0) // valid CanID
    {
        if (m_omStrMsg.IsEmpty()) //invalid string
        {
            AfxMessageBox(_("Invalid message string"));
            GotoDlgCtrl(GetDlgItem(IDC_EDIT_CANID_STRING));
            nResult = -1;
        }
    }

    if (nResult >= 0) // everything valid
    {
        CDialog::OnOK();
    }
}
开发者ID:BlackVodka,项目名称:busmaster,代码行数:74,代码来源:MsgIDAttr.cpp

示例3: SetWindowText

LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	SetWindowText(_T("Date"));

#if defined(_WIN32_WCE)

    SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
    RHO_ASSERT(SHInitDialog(&shidi));

    SHMENUBARINFO mbi = { sizeof(mbi), 0 };
    mbi.hwndParent = m_hWnd;
    mbi.nToolBarId = IDR_GETURL_MENUBAR;
    mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
    RHO_ASSERT(SHCreateMenuBar(&mbi));
	GotoDlgCtrl(GetDlgItem(IDC_TIME_CTRL));

#else

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);

    return FALSE;
}
开发者ID:LittleForker,项目名称:rhodes,代码行数:27,代码来源:DateTimePicker.cpp

示例4: AfxMessageBox

/*****************************************************************************
** Procedure:  CGroupPropPage::OnKillActive
**
** Arguments: void
**
** Returns:    TRUE/FALSE if page switch is ok
**
** Description: Called by the framework when this page is being destroyed
**
*****************************************************************************/
BOOL CGroupPropPage::OnKillActive() 
{
	// Validate our control data
	if (UpdateData(TRUE))
	{
		// Validate the groupid.
		if (m_dwGroupID == 0)
		{
			AfxMessageBox(IDS_BADGROUPID);
			GotoDlgCtrl(&m_edtGroupID);
			return FALSE;
		}

		// Make sure it doesn't exist.
		if (!m_fExisting && !MyDevice()->GetAgentGroupById(m_dwGroupID).IsEmpty())
		{
			AfxMessageBox(IDS_GROUPEXISTS);
			GotoDlgCtrl(&m_edtGroupID);
			return FALSE;
		}

		if (m_strName.IsEmpty())
		{
			AfxMessageBox(IDS_BADGROUPNAME);
			GotoDlgCtrl(GetDlgItem(IDC_LINE_NAME));
			return FALSE;
		}
	}
	return CPropertyPage::OnKillActive();

}// CGroupPropPage::OnKillActive
开发者ID:junction,项目名称:jn-tapi,代码行数:41,代码来源:properties.cpp

示例5: UpdateData

void CIntegRevRange::OnToClick() 
{
	UpdateData();
	GetDlgItem(IDC_T_REVNBR)->EnableWindow( FALSE );
	GetDlgItem(IDC_T_SYMBOL)->EnableWindow( FALSE );
	switch(m_to_flag)
	{
	case 1:
			GetDlgItem(IDC_T_REVNBR)->EnableWindow( TRUE );
			GetDlgItem(IDC_T_COMBO)->EnableWindow( FALSE );
			GetDlgItem(IDC_T_BROWSE)->EnableWindow( FALSE );
			GotoDlgCtrl(GetDlgItem(IDC_T_REVNBR));
			break;
	case 2:
			GetDlgItem(IDC_T_SYMBOL)->EnableWindow( TRUE );
			GetDlgItem(IDC_T_COMBO)->EnableWindow( TRUE );
			OnToComboValueChg();
			GotoDlgCtrl(GetDlgItem(IDC_T_COMBO));
			break;
	default:
			GetDlgItem(IDC_T_COMBO)->EnableWindow( FALSE );
			GetDlgItem(IDC_T_BROWSE)->EnableWindow( FALSE );
			break;
	}
}
开发者ID:danieljennings,项目名称:p4win,代码行数:25,代码来源:RevRange.cpp

示例6: SetWindowText

LRESULT CRhoBluetoothDiscoveredDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	SetWindowText(_T("Discoverable"));

#if defined(_WIN32_WCE)

	SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
	RHO_ASSERT(SHInitDialog(&shidi));


	SHMENUBARINFO mbi = { sizeof(mbi), 0 };
	mbi.hwndParent = m_hWnd;
	mbi.nToolBarId = IDR_GETURL_MENUBAR;
	mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
	RHO_ASSERT(SHCreateMenuBar(&mbi));
	//GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));

#else 

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	//DLG_ITEM_SET_FONT_BOLD (IDC_DATE_STATIC);
	//DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);

	//if (m_format == CDateTimeMessage::FORMAT_DATE) {
	//	GetDlgItem(IDC_TIME_CTRL).ShowWindow(SW_HIDE);
	//	GetDlgItem(IDC_TIME_STATIC).ShowWindow(SW_HIDE);
	//}
	return FALSE;
}
开发者ID:wave2future,项目名称:rhodes,代码行数:33,代码来源:Bluetooth.cpp

示例7: GotoDlgCtrl

bool CDlg::OnOverEdit(int IdBeg, int IdEnd)
{
	CString strItem,strMsg,strCount;
	int count=0;
	int Id;
	strMsg.LoadString(IDS_STRING9016);

	GotoDlgCtrl(GetDlgItem(IdBeg));
	do{
		Id = GetFocus()->GetDlgCtrlID();
		switch(Id){
			case IDC_EDIT1:
				GetDlgItem(IDC_EDIT1)->GetWindowTextW(m_Edit1);
				m_Edit1.Replace(',','.');
				m_Edit1.TrimRight();
				m_Edit1.TrimLeft();
				if(m_Edit1==' ') m_Edit1.Empty();
				if(m_Edit1.IsEmpty()){
					count++;
					GetDlgItem(IDC_STATIC_EDIT1)->GetWindowText(strItem);
					strCount.Format(_T("%i"),count);
					strCount+=_T(") ");
					strMsg+=strCount+strItem+_T("\n\t");
				}
				break;
		}
		NextDlgCtrl();
	} while (Id!=IdEnd);
	if(count!=0)
		AfxMessageBox(strMsg,MB_ICONINFORMATION);
	return count==0 ? true:false;
}
开发者ID:03bekjob,项目名称:Strg,代码行数:32,代码来源:Dlg.cpp

示例8: UpdateData

void EinDaten::OnCbnSelchangeAuswahl()
{
	UpdateData(TRUE); //Daten im Dialog werden aktualisert
	wert = DemoData.get_wert(auswahl, nummer - 1);
	UpdateData(FALSE); //Update der Nutzeroberfläche
	GotoDlgCtrl(GetDlgItem(IDC_WERT));
}
开发者ID:Floeke,项目名称:GUI-Programming,代码行数:7,代码来源:EinDaten.cpp

示例9: SetDlgItemText

BOOL CFilterDlg::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/)
{
	SetDlgItemText(IDC_NAME, m_name.c_str());

	m_tabCtrl.Attach(GetDlgItem(IDC_TAB));
	m_tabCtrl.AddItem(L"Messages");
	m_tabCtrl.AddItem(L"Processes");
	CRect tabRect;
	m_tabCtrl.GetWindowRect(&tabRect);
	m_tabCtrl.AdjustRect(false, &tabRect);
	m_tabCtrl.ScreenToClient(&tabRect);

	CRect dlgRect;
	GetClientRect(&dlgRect);
	m_border.cx = dlgRect.Width() - tabRect.Width();
	m_border.cy = dlgRect.Height() - tabRect.Height();

	m_messagePage.Create(m_tabCtrl, tabRect);
	m_messagePage.MoveWindow(&tabRect);
	m_messagePage.ShowWindow(SW_SHOW);

	m_processPage.Create(m_tabCtrl, tabRect);
	m_processPage.MoveWindow(&tabRect);
	m_processPage.ShowWindow(SW_HIDE);

	m_regExDlg.Create(*this, 0);
	m_regExDlg.ShowWindow(SW_HIDE);

	CenterWindow(GetParent());
	DlgResize_Init();

	GotoDlgCtrl(m_tabCtrl.GetDlgItem(0));
	return FALSE;
}
开发者ID:JayceM6,项目名称:DebugViewPP,代码行数:34,代码来源:FilterDlg.cpp

示例10: GotoDlgCtrl

void CTempDirPage::OnOK() 
{
	if (!m_Inited)
		return;

	// This bit of silliness is required to ensure all the 
	// fields provide their data to the UpdateData() routine
	GotoDlgCtrl(GetParent()->GetDlgItem(IDC_APPLY));

	m_ErrorCount=0;

	if(UpdateData(TRUE))
	{
		m_TempPath.TrimRight();
		m_TempPath.TrimLeft();

		if(m_TempPath.GetLength())
		{
			if(TestTempDir(m_TempPath))
			{
				if( m_TempPath != GET_P4REGPTR()->GetTempDir() )
					if(!GET_P4REGPTR()->SetTempDir( m_TempPath ) )
						m_ErrorCount++;
			}
			else 
				m_ErrorCount++;
		}
		else
		{
			m_ErrorCount++;
			AfxMessageBox(IDS_TEMPORARY_FILES_DIRECTORY_NOT_WRITEABLE, MB_ICONSTOP);
		}

		if( m_AltExpl != GET_P4REGPTR()->GetAltExpl() )
		{
			if(!GET_P4REGPTR()->SetAltExpl( m_AltExpl ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetExplorer( m_Explorer ) )
				m_ErrorCount++;
		}
		BOOL b2pane = TRUE;
		if( m_2Panes.GetCheck() == 0 )
			b2pane = FALSE;
		if( b2pane != GET_P4REGPTR()->Get2Panes( ) )
			if(!GET_P4REGPTR()->Set2Panes( b2pane ) )
				m_ErrorCount++;

		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetDefaultDnDfromExp(m_DnDDefault))
				m_ErrorCount++;
		}

		if(m_ErrorCount)
			AfxMessageBox(IDS_BAD_REGISTRY, MB_ICONSTOP);
	}		
}
开发者ID:danieljennings,项目名称:p4win,代码行数:60,代码来源:TempDirPage.cpp

示例11: CenterWindow

LRESULT CAddUserDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
   CenterWindow();
   // Create font, logo, set dialog controls
   NONCLIENTMETRICS ncm = { sizeof(ncm) };
   ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
   ncm.lfMessageFont.lfWeight = FW_BOLD;
   m_hFont = ::CreateFontIndirect(&ncm.lfMessageFont);
   SendDlgItemMessage(IDC_DESCRIPTION_LABEL, WM_SETFONT, (WPARAM) m_hFont);
   m_hLogoBmp = ::LoadBitmap(_pModule->GetResourceInstance(), MAKEINTRESOURCE(IDB_FLICKRDRIVE1));
   SHFILEINFO sfi = { 0 }; ::SHGetFileInfo(_T("C:\\"), 0, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX);
   CComPtr<IImageList> spImageList;
   m_hDriveIcon = NULL;
   ::SHGetImageList(SHIL_JUMBO, IID_PPV_ARGS(&spImageList));
   if( spImageList != NULL ) spImageList->GetIcon(sfi.iIcon, ILD_TRANSPARENT, &m_hDriveIcon);
   CString str;
   str.LoadString(IDS_ACCOUNT_GUEST);
   ATLASSERT(FLICKRFS_ACCOUNT_GUEST==0);
   SendDlgItemMessage(IDC_ACCOUNT, CB_ADDSTRING, (WPARAM) 0, (LPARAM) static_cast<LPCTSTR>(str));
   str.LoadString(IDS_ACCOUNT_FULLPERM);
   SendDlgItemMessage(IDC_ACCOUNT, CB_ADDSTRING, (WPARAM) 0, (LPARAM) static_cast<LPCTSTR>(str));
   SendDlgItemMessage(IDC_ACCOUNT, CB_SETCURSEL, 0, 0);
   SetDlgItemText(IDC_USERNAME, _T(""));
   GotoDlgCtrl(GetDlgItem(IDC_USERNAME));
   return 0;
}
开发者ID:sunnydoll,项目名称:flickrdrive,代码行数:26,代码来源:AddUserDlg.cpp

示例12: GotoDlgCtrl

BOOL CUserInputDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	CWnd *p=GetDlgItem(IDC_ISDNMESSAGE);
	GotoDlgCtrl(p);
	return FALSE;
}
开发者ID:paulhiggs,项目名称:decode1,代码行数:7,代码来源:UserInputDlg.cpp

示例13: GetMessageContact

void MessagesDlg::OnEnMsgfilterMessage(NMHDR *pNMHDR, LRESULT *pResult)
{
	MSGFILTER *pMsgFilter = reinterpret_cast<MSGFILTER *>(pNMHDR);

	if (pMsgFilter->msg == WM_CHAR) {
		if ( pMsgFilter->wParam == VK_RETURN ) {
			CRichEditCtrl* richEdit = (CRichEditCtrl*)GetDlgItem(IDC_MESSAGE);
			CString message;
			int len = richEdit->GetWindowTextLength();
			LPTSTR ptr = message.GetBuffer(len);
			richEdit->GetWindowText(ptr,len+1);
			message.ReleaseBuffer();
			message.Trim();
			if (message.GetLength()) {
				MessagesContact* messagesContact = GetMessageContact();
				if (SendMessage (messagesContact,message) ) {
					richEdit->SetWindowText(NULL);
					GotoDlgCtrl(richEdit);
					AddMessage(messagesContact, message, MSIP_MESSAGE_TYPE_LOCAL);
				}
			}
			*pResult= 1;
			return;
		}
	}
	*pResult = 0;
}
开发者ID:cookie114,项目名称:PerforceRoot_Lupc,代码行数:27,代码来源:MessagesDlg.cpp

示例14: GetDlgItem

void CExpandArrayDlg::OnOK() 
{
	//UpdateData();

	if(m_iOffset < 0)
	{
		CWnd*	pWnd = GetDlgItem(IDC_OFFSET_EDT);
		GotoDlgCtrl(pWnd);

		CString		strMessage;
		strMessage.Format(_T("Invalid value: minimum value is 0"));
		AfxMessageBox(strMessage);
		return;
	}
	if(m_iOffset > m_iMaxCount)
	{
		CWnd*	pWnd = GetDlgItem(IDC_OFFSET_EDT);
		GotoDlgCtrl(pWnd);

		CString		strMessage;
		strMessage.Format(_T("Invalid value: maximum value is %d"), m_iMaxCount-1);
		AfxMessageBox(strMessage);
		return;
	}
	if(m_iCount < 1)
	{
		CWnd*	pWnd = GetDlgItem(IDC_COUNT_EDT);
		GotoDlgCtrl(pWnd);

		CString		strMessage;
		strMessage.Format(_T("Invalid value: minimum value is 1"));
		AfxMessageBox(strMessage);
		return;
	}
	if((m_iCount + m_iOffset) > m_iMaxCount)
	{
		CWnd*	pWnd = GetDlgItem(IDC_COUNT_EDT);
		GotoDlgCtrl(pWnd);

		CString		strMessage;
		strMessage.Format(_T("Invalid value: maximum value is %d"), m_iMaxCount-m_iOffset-1);
		AfxMessageBox(strMessage);
		return;
	}

	CDialog::OnOK();
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:47,代码来源:ExpandArrayDlg.cpp

示例15: UpdateData

void CGridDlg::OnSelChangeGrid()
{
    if (m_OcxGrid) {
        m_cellValue = m_OcxGrid.GetText();
        UpdateData(FALSE); // calls DoDataExchange to update edit control
        GotoDlgCtrl(GetDlgItem(IDC_VALUE)); // position edit control
    }
}
开发者ID:alannet,项目名称:example,代码行数:8,代码来源:GridDlg.cpp


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