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

📄 newcategory.cpp

📁 离线的RSS阅读器
💻 CPP
字号:
// NewCategory.cpp : implementation file
//

#include "stdafx.h"
#include "DiamondReader.h"
#include "NewCategory.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewCategory dialog


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

CNewCategory::CNewCategory(char** name,CWnd* pParent /* = NULL */)
	: CDialog(CNewCategory::IDD, pParent){
	m_name = name;
}

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


BEGIN_MESSAGE_MAP(CNewCategory, CDialog)
	//{{AFX_MSG_MAP(CNewCategory)
	ON_BN_CLICKED(IDC_NEWCATEGORYAPPLY, OnNewcategoryapply)
	ON_BN_CLICKED(IDC_NEWCATEGORYRESET, OnNewcategoryreset)
	ON_BN_CLICKED(IDC_NEWCATEGORYCANCLE, OnNewcategorycancle)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewCategory message handlers

void CNewCategory::OnNewcategoryapply() 
{
	// TODO: Add your control notification handler code here
	CEdit *edit = (CEdit*)GetDlgItem(IDC_EDIT10);
	int length = edit->LineLength(0);
	*(this->m_name) = new char[length+1];
	edit->GetLine(0,*m_name);
	CString cs;
	edit->GetWindowText(cs);
	strcpy(*m_name,(LPTSTR)(LPCTSTR)cs);
	EndDialog(1);
}

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

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

BOOL CNewCategory::OnInitDialog(){
	this->SetFocus();
	return true;
}

⌨️ 快捷键说明

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