📄 newchanneldlg.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -