|
// RemoteProcessDlg.cpp : implementation file
//
#include "stdafx.h"
#include "RemoteAdmin.h"
#include "RemoteProcessDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRemoteProcessDlg dialog
CRemoteProcessDlg::CRemoteProcessDlg(CWnd* pParent /*=NULL*/)
: CDialog(CRemoteProcessDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CRemoteProcessDlg)
m_strDomain = _T("");
m_strPassword = _T("");
m_strProcessPath = _T("");
m_strUser = _T("");
//}}AFX_DATA_INIT
}
void CRemoteProcessDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRemoteProcessDlg)
DDX_Text(pDX, IDC_EDIT_DOMAIN, m_strDomain);
DDX_Text(pDX, IDC_EDIT_PASSWORD, m_strPassword);
DDX_Text(pDX, IDC_EDIT_PROCESS_NAME, m_strProcessPath);
DDX_Text(pDX, IDC_EDIT_USER, m_strUser);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CRemoteProcessDlg, CDialog)
//{{AFX_MSG_MAP(CRemoteProcessDlg)
ON_EN_CHANGE(IDC_EDIT_PROCESS_NAME, OnProcessNameChange)
ON_EN_CHANGE(IDC_EDIT_USER, OnUserNameChange)
ON_WM_CANCELMODE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CRemoteProcessDlg::OnProcessNameChange()
{
CString strProcess;
CString strUser;
CButton* bButton = NULL;
GetDlgItemText(IDC_EDIT_PROCESS_NAME, strProcess);
GetDlgItemText(IDC_EDIT_USER, strUser);
if (strProcess == _T("") || strUser == _T(""))
{
bButton = static_cast<CButton*>(GetDlgItem(IDOK));
bButton->EnableWindow(FALSE);
}
else
{
bButton = static_cast<CButton*>(GetDlgItem(IDOK));
bButton->EnableWindow(TRUE);
}
}
void CRemoteProcessDlg::OnUserNameChange()
{
CString strProcess;
CString strUser;
CButton* bButton = NULL;
GetDlgItemText(IDC_EDIT_PROCESS_NAME, strProcess);
GetDlgItemText(IDC_EDIT_USER, strUser);
if (strProcess == _T("") || strUser == _T(""))
{
bButton = static_cast<CButton*>(GetDlgItem(IDOK));
bButton->EnableWindow(FALSE);
}
else
{
bButton = static_cast<CButton*>(GetDlgItem(IDOK));
bButton->EnableWindow(TRUE);
}
}
BOOL CRemoteProcessDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CButton* bButton = static_cast<CButton*>(GetDlgItem(IDOK));
bButton->EnableWindow(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CRemoteProcessDlg::OnCancelMode()
{
CDialog::OnCancelMode();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.