Exemplo n.º 1
0
/*****************************************************************************
** 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
Exemplo n.º 2
0
/* #FN#
   Sets up the state of the wizard controls */
void
/* #AS#
   Nothing */
CWizardDlg::
SetWizardState()
{
	CButton *pBack   = (CButton *)GetDlgItem( IDC_WIZARD_BACK );
	CButton *pNext   = (CButton *)GetDlgItem( IDC_WIZARD_NEXT );
	CButton *pFinish = (CButton *)GetDlgItem( IDC_WIZARD_FINISH );

	BOOL bFirst = (BOOL)(!m_nCurrentIndex);
	BOOL bLast  = (BOOL)(m_nCurrentIndex == m_arrPages.GetUpperBound());

	ASSERT(NULL != pBack && NULL != pNext && NULL != pFinish);

	pBack->EnableWindow( !bFirst );
	pNext->EnableWindow( !bLast );

	if( bLast )
	{
		SetDefID( IDC_WIZARD_FINISH );
		GotoDlgCtrl( pFinish );
	}
	else
	{
		SetDefID( IDC_WIZARD_NEXT );
		if( bFirst )
			GotoDlgCtrl( pNext );
	}
	/* Set wizard dialog title */
	m_strTitle.Format( IDS_WIZARD_TITLE, m_nCurrentIndex + 1, m_arrPages.GetUpperBound() != -1 ? m_arrPages.GetUpperBound() + 1 : 1 );
	SetWindowText( m_strTitle );

} /* #OF# CWizardDlg::SetWizardState */
Exemplo n.º 3
0
/******************************************************************************
 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();
    }
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
/*****************************************************************************
** 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
Exemplo n.º 6
0
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;
	}
}
Exemplo n.º 7
0
/*****************************************************************************
** Procedure:  CActivityPropPage::OnKillActive
**
** Arguments: void
**
** Returns:    TRUE/FALSE if page switch is ok
**
** Description: Called by the framework when this page is being destroyed
**
*****************************************************************************/
BOOL CActivityPropPage::OnKillActive() 
{
	// Validate our control data
	if (UpdateData(TRUE))
	{
		if (m_nActivityID == 0 || m_nActivityID > 9999)
		{
			AfxMessageBox(IDS_BADACTIVITYID);
			GotoDlgCtrl(&m_edtActivityID);
			return FALSE;
		}

		if (m_strName.IsEmpty())
		{
			AfxMessageBox(IDS_BADACTIVITYNAME);
			GotoDlgCtrl(GetDlgItem(IDC_ACTIVITY_NAME));
			return FALSE;
		}

		if (!MyDevice()->GetAgentActivityById(m_nActivityID).IsEmpty() && m_fExisting == false)
		{
			AfxMessageBox(IDS_ACTIVITYEXISTS);
			GotoDlgCtrl(&m_edtActivityID);
			return FALSE;
		}
	}
	return CPropertyPage::OnKillActive();

}// CActivityPropPage::OnKillActive
Exemplo n.º 8
0
LRESULT CDateTimePickerDialog::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));

	SYSTEMTIME times[2]; // min and max times
	unsigned int flags = 0;


	if (m_min_time != 0) {
		UnixTimeToSystemTime(m_min_time, &(times[0]));
		flags = flags | GDTR_MIN;
	}
	if (m_max_time != 0) {
		UnixTimeToSystemTime(m_max_time, &(times[1]));
		flags = flags | GDTR_MAX;
	}
	DateTime_SetRange( GetDlgItem(IDC_DATE_CTRL), flags, times);


	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;
}
Exemplo n.º 9
0
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;
}
Exemplo n.º 10
0
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;
}
Exemplo n.º 11
0
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));
}
Exemplo n.º 12
0
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;
}
Exemplo n.º 13
0
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);
	}		
}
Exemplo n.º 14
0
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;
}
Exemplo n.º 15
0
BOOL CUserInputDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	CWnd *p=GetDlgItem(IDC_ISDNMESSAGE);
	GotoDlgCtrl(p);
	return FALSE;
}
Exemplo n.º 16
0
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;
}
Exemplo n.º 17
0
bool CDlg::OnOverEdit(int IdBeg, int IdEnd)
{
	CString strItem,strMsg,strCount;
	int count=0;
	int Id;
//	strMsg = _T("Вы забыли заполнить следующие поля :\n\t");
	strMsg.LoadString(IDS_STRING9016);

	GotoDlgCtrl(GetDlgItem(IdBeg));
	do{
		Id = GetFocus()->GetDlgCtrlID();
		switch(Id){
			case IDC_EDIT1:
				if(m_Edit1.IsEmpty()){
					count++;
					GetDlgItem(IDC_STATIC_EDIT1)->GetWindowText(strItem);
					strCount.Format(L"%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;
}
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();
}
Exemplo n.º 19
0
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
    }
}
Exemplo n.º 20
0
void COldChgFilterDlg::OnUser()
{
	UpdateData(TRUE);
	GetDlgItem(IDC_USER)->EnableWindow(m_useUser);
	GetDlgItem(IDC_BROWSE_USERS)->EnableWindow(m_useUser);
	if (m_useUser)
		GotoDlgCtrl(GetDlgItem(IDC_USER));
}
Exemplo n.º 21
0
void COldChgFilterDlg::OnClient()
{
	UpdateData(TRUE);
	GetDlgItem(IDC_CLIENT)->EnableWindow(m_useClient);
	GetDlgItem(IDC_BROWSE_CLIENTS)->EnableWindow(m_useClient);
	if (m_useClient)
		GotoDlgCtrl(GetDlgItem(IDC_CLIENT));
}
Exemplo n.º 22
0
BOOL CSampleTextDlg::OnInitDialog() 
{
  CPWDialog::OnInitDialog();

  GotoDlgCtrl(GetDlgItem(IDC_SAMPLETEXT));

  return FALSE;
}
Exemplo n.º 23
0
LRESULT COldChgFilterDlg::OnBrowseClientsCallBack(WPARAM wParam, LPARAM lParam)
{
	UpdateData(TRUE);
	CString *str = (CString *)lParam;
	m_client = *str;
	UpdateData(FALSE);
	GotoDlgCtrl(GetDlgItem(IDC_CLIENT));
	return 0;
}
Exemplo n.º 24
0
LRESULT COldChgFilterDlg::OnBrowseUsersCallBack(WPARAM wParam, LPARAM lParam)
{
	UpdateData(TRUE);
	CString *str = (CString *)lParam;
	m_user = *str;
	UpdateData(FALSE);
	GotoDlgCtrl(GetDlgItem(IDC_USER));
	return 0;
}
Exemplo n.º 25
0
void CFilterByOwnerDlg::OnOwner()
{
	UpdateData( );
	BOOL b = m_NotUser;
	GetDlgItem(IDC_OWNER)->EnableWindow(b);
	GetDlgItem(IDC_BROWSE)->EnableWindow(b);
	if (b)
		GotoDlgCtrl(GetDlgItem(IDC_OWNER));
}
Exemplo n.º 26
0
BOOL RegistrationDialog::OnInitDialog()
{
	CWnd* item = GetDlgItem(IDOK);
	if (item)
	{
//		item->EnableWindow(FALSE); // disable this
	}
	m_name = (CEdit*)GetDlgItem(IDC_EDITNAME);
	m_organization = (CEdit*)GetDlgItem(IDC_EDITORG);
//	m_registrationCode = (CEdit*)GetDlgItem(IDC_EDITREGCODE);

	char namebuf[256];
	unsigned long length = 256;
	GetUserName(namebuf, &length);
	m_name->SetWindowText(namebuf);

	GotoDlgCtrl(m_name);
	SetDefID(IDOK);
	if (item)
		((CButton*)item)->SetButtonStyle(BS_DEFPUSHBUTTON);
	item = GetDlgItem(IDCANCEL);
	if (item)
		((CButton*)item)->SetButtonStyle(0);

	RegistrationInfo info;
	GetRegistrationInfo(&info);
/*
	if (!(info.isRegistered))
	{
		item = GetDlgItem(IDC_DAYSREMAINING);
		time_t ltime;
		time_t currTime = time(&ltime);
		int daysRemaining = info.daysRemaining;
		if (daysRemaining < 0)
		{
			char buf[256];
			sprintf_s(buf, sizeof(buf),
				"Sorry, your evaluation time has expired. "
				"You are %d days past your evaluation period. "
				"You may use this application, but you will be periodically "
				"reminded to register your copy.", -daysRemaining);
			AfxMessageBox(buf);
			theApp.m_expired = TRUE;
			theApp.m_lastExpiredScreenTime = GetTickCount();
			item->SetWindowText("Expired");
		}
		else
		{
			char buf[16];
			sprintf_s(buf, sizeof(buf), "%d", daysRemaining);
			item->SetWindowText(buf);
		}
	}
*/
	return FALSE;
}
Exemplo n.º 27
0
void CJobsConfigure::OnFormInfo()
{
	CCmd_Describe *pCmd = new CCmd_Describe;
	pCmd->Init( m_hWnd, RUN_ASYNC );
	if( pCmd->Run( P4JOB_SPEC, _T("0") ) )
		MainFrame()->UpdateStatus( LoadStringResource(IDS_FETCHING_SPEC) );	
	else
		delete pCmd;
	GotoDlgCtrl(GetDlgItem(IDC_LIST_OTHER));
}
void CHorizontalAnisotropyObsWellDlg::OnOK()
{
  // kluge to make sure that ctrl with current focus gets updated
  GotoDlgCtrl(GetDlgItem(IDOK));

  dataCaptureSpec.obsXLocation = m_obsXLocation;
  dataCaptureSpec.obsYLocation = m_obsYLocation;

  CDialog::OnOK();
}
Exemplo n.º 29
0
LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	if ((m_title != NULL) && (strlen(m_title) > 0)) {
		String title = m_title;
		StringW title_w = convertToStringW(title);
		//SetWindowText(title_w.c_str());
		//GetDlgItem(IDC_TIME_CTRL).SetWindowText(title_w.c_str());
		SetDlgItemText(ID_TIME_CAPTION, title_w.c_str());
	}
	else {
		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));

	SYSTEMTIME start_time;
	if (m_initialTime != 0) {
		UnixTimeToSystemTime(m_initialTime, &start_time);
		DateTime_SetSystemtime( GetDlgItem(IDC_TIME_CTRL), GDT_VALID, &start_time);
	}

#else

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);
	DLG_ITEM_SET_FONT_BOLD (ID_TIME_CAPTION);

    return FALSE;
}
Exemplo n.º 30
0
void CSequencePulseSlugDlg::OnOK()
{
    // kluge to make sure that ctrl with current focus gets updated
    GotoDlgCtrl(GetDlgItem(IDOK));

    m_psData.initialPressureType = PulseSlugBase::InitialPressureType(m_initialPressureType);
    m_psData.initialPressure = m_initialPressure;

    CSequenceTimeStepDlg::OnOK();
}