home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softwarová Záchrana 3
/
Softwarova-zachrana-3.bin
/
pserv.cpl
/
pserv-2.4.exe
/
source
/
RemoteConnectDialog.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2005-01-05
|
2KB
|
72 lines
// RemoteConnectDialog.cpp : implementation file
//
#include "stdafx.h"
#include "pserv2.h"
#include "RemoteConnectDialog.h"
#include "CConfiguration.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
void DDX_ExchangeComboArray(CDataExchange* pDX, CComboBox& combobox, CStringArray& stringarray)
{
if( pDX->m_bSaveAndValidate )
{
CString current;
combobox.GetWindowText(current);
for( int nIndex = 0, nMaxIndex = stringarray.GetSize(); nIndex < nMaxIndex; nIndex++ )
{
if( stringarray.GetAt(nIndex).Compare(current) == 0 )
{
stringarray.RemoveAt(nIndex);
break;
}
}
stringarray.InsertAt(0, current);
}
else
{
for( int nIndex = 0, nMaxIndex = stringarray.GetSize(); nIndex < nMaxIndex; nIndex++ )
{
combobox.InsertString(nIndex, stringarray.GetAt(nIndex) );
}
combobox.SetCurSel(0);
}
}
/////////////////////////////////////////////////////////////////////////////
// CRemoteConnectDialog dialog
CRemoteConnectDialog::CRemoteConnectDialog(CWnd* pParent /*=NULL*/)
: CDialog(CRemoteConnectDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CRemoteConnectDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CRemoteConnectDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRemoteConnectDialog)
DDX_Control(pDX, IDC_COMPUTER_NAME, m_cbComputerName);
//}}AFX_DATA_MAP
DDX_ExchangeComboArray(pDX, m_cbComputerName, theConfiguration.m_ComputerNames );
}
BEGIN_MESSAGE_MAP(CRemoteConnectDialog, CDialog)
//{{AFX_MSG_MAP(CRemoteConnectDialog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRemoteConnectDialog message handlers