home *** CD-ROM | disk | FTP | other *** search
- // Connect.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "NetCap.h"
- #include "Connect.h"
-
- /////////////////////////////////////////////////////////////////////////////
- // CConnection dialog
-
-
- CConnection::CConnection(CWnd* pParent /*=NULL*/)
- : CDialog(CConnection::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CConnection)
- //}}AFX_DATA_INIT
- m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
- }
-
- void CConnection::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CConnection)
- DDX_Control(pDX, IDC_LEAD, m_Lead);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CConnection, CDialog)
- //{{AFX_MSG_MAP(CConnection)
- ON_WM_CLOSE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CConnection message handlers
-
- BOOL CConnection::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- SetIcon(m_hIcon, TRUE);
- SetIcon(m_hIcon, FALSE);
-
- UNLOCKSUPPORT(m_Lead);
-
- m_Lead.SetBitmap(0);
-
- m_Lead.SetAppearance(APPEARANCE_FLAT);
- m_Lead.SetPaintDither(PAINTDITHER_DIFFUSION);
- m_Lead.SetPaintPalette(PAINTPALETTE_AUTO);
- m_Lead.SetPaintSizeMode(PAINTSIZEMODE_NORMAL);
- m_Lead.SetAutoScroll(FALSE);
- m_Lead.SetAutoRepaint(FALSE);
- m_Lead.SetBackErase(FALSE);
- m_Lead.SetAutoSize(TRUE);
- m_Lead.SetAutoSetRects(TRUE);
- m_Lead.SetBorderStyle(0);
- m_Lead.SetEnableMethodErrors(FALSE);
-
- m_nBytesIn = 0;
- m_nBytesOut = 0;
- m_nImagesIn = 0;
- m_nImagesOut = 0;
- m_nTime = GetTickCount();
- m_nTimeout = m_nTime;
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-
- void CConnection::OnClose()
- {
- //sb: do not call CDialog::OnClose() here because Disconnect closes the window!!
- m_pOwner->Disconnect(m_nComputer);
- }
-