getcollectionnamedlg.cpp
来自「离线的RSS阅读器」· C++ 代码 · 共 61 行
CPP
61 行
// GetCollectionNameDlg.cpp : implementation file
//
#include "stdafx.h"
#include "DiamondReader.h"
#include "GetCollectionNameDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGetCollectionNameDlg dialog
CGetCollectionNameDlg::CGetCollectionNameDlg(CWnd* pParent /*=NULL*/)
: CDialog(CGetCollectionNameDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CGetCollectionNameDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CGetCollectionNameDlg::CGetCollectionNameDlg(char **name,CWnd* pParent /* = NULL */)
: CDialog(CGetCollectionNameDlg::IDD, pParent)
{
this->m_name = name;
}
void CGetCollectionNameDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGetCollectionNameDlg)
DDX_Control(pDX, IDC_EDIT1, m_edit);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGetCollectionNameDlg, CDialog)
//{{AFX_MSG_MAP(CGetCollectionNameDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGetCollectionNameDlg message handlers
void CGetCollectionNameDlg::OnOK()
{
// TODO: Add extra validation here
int length = m_edit.LineLength(0);
*m_name = new char[length+1];
m_edit.GetLine(0,*m_name);
CString cs;
m_edit.GetWindowText(cs);
strcpy(*m_name,(LPTSTR)(LPCTSTR)cs);
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?