⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputurldlg.cpp

📁 Visual C++网络通信编程实用案例精逊配套源码 光盘中存放的是书中涉及的所有实例的源代码和经过编译后的应用程序。所有程序均经过测试
💻 CPP
字号:
#include "stdafx.h"
#include "SiteDownload.h"
#include "InputURLDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CURLDlg dialog


// Constructor
CURLDlg::CURLDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CURLDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CURLDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

	m_nMaxPages = 0;
	m_nMaxLevels = 0;
	m_bGetMultimedia = FALSE;
}

// Handles field binding for MFC
void CURLDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CURLDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CURLDlg, CDialog)
	//{{AFX_MSG_MAP(CURLDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CURLDlg message handlers

// Handles the OK button
void CURLDlg::OnOK() 
{
	// Get the specified URL
	GetDlgItem(IDC_EDIT)->GetWindowText(m_strURL);

	CDialog::OnOK();
}

BOOL CURLDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	// Set the current URL
	SetDlgItemText(IDC_EDIT,m_strURL);

	// Set the info fields also -- max levels and so forth
	SetDlgItemInt(IDC_MAX_LEVELS,m_nMaxLevels,FALSE);
	if(m_nMaxPages)
		SetDlgItemInt(IDC_MAX_PAGES,m_nMaxPages,FALSE);
	else SetDlgItemText(IDC_MAX_PAGES,"No limit");

	SetDlgItemText(IDC_GET_MEDIA,m_bGetMultimedia?"Yes":"No");

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -