newchanneldlg.cpp

来自「离线的RSS阅读器」· C++ 代码 · 共 82 行

CPP
82
字号
// NewChannelDlg.cpp : implementation file
//

#include "stdafx.h"
#include "DiamondReader.h"
#include "NewChannelDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewChannelDlg dialog


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


void CNewChannelDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNewChannelDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

CNewChannelDlg::CNewChannelDlg(char** url,CWnd* pParent /* = NULL */)
	: CDialog(CNewChannelDlg::IDD, pParent)
{
	xmlurl = url;
	
}

BEGIN_MESSAGE_MAP(CNewChannelDlg, CDialog)
	//{{AFX_MSG_MAP(CNewChannelDlg)
	ON_BN_CLICKED(IDC_NEW_CHANNEL_APPLY, OnNewChannelApply)
	ON_BN_CLICKED(IDC_NEW_CHANNEL_RESET, OnNewChannelReset)
	ON_BN_CLICKED(IDC_NEW_CHANNEL_CANCEL, OnNewChannelCancel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewChannelDlg message handlers

void CNewChannelDlg::OnNewChannelApply() 
{
	// TODO: Add your control notification handler code here
	CEdit *edit = (CEdit*)GetDlgItem(IDC_EDIT1);
	int length = edit->LineLength(0);
	*xmlurl = new char[length+1];
	edit->GetLine(0,*xmlurl);

	CString cs;
	edit->GetWindowText(cs);
	strcpy(*xmlurl,(LPTSTR)(LPCTSTR)cs);
	EndDialog(1);
}

void CNewChannelDlg::OnNewChannelReset() 
{
	// TODO: Add your control notification handler code here
	CEdit *edit = (CEdit*)GetDlgItem(IDC_EDIT1);
	edit->Clear();
	edit->SetWindowText("");
	edit->SetFocus();
	edit->Invalidate();
}

void CNewChannelDlg::OnNewChannelCancel() 
{
	// TODO: Add your control notification handler code here
	EndDialog(0);
}

⌨️ 快捷键说明

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