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

📄 confirmdlg.cpp

📁 一个可以查杀Redlof病毒的小工具,界面玩具地很,但实现具一定参考价值
💻 CPP
字号:
// ConfirmDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RedLofKiller.h"
#include "ConfirmDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CConfirmDlg dialog


CConfirmDlg::CConfirmDlg(CWnd* pParent , CString argFile)
	: CDialog(CConfirmDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CConfirmDlg)
	m_bUseToAll = FALSE;
	//}}AFX_DATA_INIT
	m_strFile.Format("%s", argFile);
}


/*
CConfirmDlg::CConfirmDlg( HWND hWnd,CString argFile)
	: CDialog(CConfirmDlg::IDD,&((CWnd)hWnd))
{
	//{{AFX_DATA_INIT(CConfirmDlg)
	m_bUseToAll = FALSE;
	//}}AFX_DATA_INIT
	m_strFile.Format("%s", argFile);
}
*/
void CConfirmDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CConfirmDlg)
	DDX_Control(pDX, IDC_INFECT_MSG, m_stInfectMsg);
	DDX_Check(pDX, IDC_CHK_USE_TO_ALL, m_bUseToAll);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CConfirmDlg, CDialog)
	//{{AFX_MSG_MAP(CConfirmDlg)
	ON_BN_CLICKED(IDC_DEL, OnDel)
	ON_BN_CLICKED(IDC_CLEAR, OnClear)
	ON_BN_CLICKED(IDC_IGNORE, OnIgnore)
	ON_BN_CLICKED(IDC_CHK_USE_TO_ALL, OnChkUseToAll)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CConfirmDlg message handlers

void CConfirmDlg::OnDel() 
{
	CRedLofKillerDlg * pDlg = (CRedLofKillerDlg*)GetParent();
	if (pDlg) 
	{
		pDlg->m_handleType = CRedLofKillerDlg::VIRUS_DEL;
	}
	this->PostMessage(WM_CLOSE,0,0);
}

void CConfirmDlg::OnClear() 
{
	CRedLofKillerDlg * pDlg = (CRedLofKillerDlg*)GetParent();
	if (pDlg) 
	{
		pDlg->m_handleType = CRedLofKillerDlg::VIRUS_CLEAR;
	}
	this->PostMessage(WM_CLOSE,0,0);
}

void CConfirmDlg::OnIgnore() 
{
	CRedLofKillerDlg * pDlg = (CRedLofKillerDlg*)GetParent();
	if (pDlg) 
	{
		pDlg->m_handleType = CRedLofKillerDlg::VIRUS_IGNORE;
	}
	this->PostMessage(WM_CLOSE,0,0);
}

BOOL CConfirmDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
  CString strMsg;
	strMsg.LoadString(IDS_MSG_INFECTED);		
	strMsg.Insert(0,m_strFile);
	m_stInfectMsg.SetWindowText(strMsg);
	SetParent(NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CConfirmDlg::OnChkUseToAll() 
{
	UpdateData(TRUE);
	CRedLofKillerDlg * pDlg = (CRedLofKillerDlg*)GetParent();;
	if (pDlg) 
	{
		pDlg->m_bUseToAll = m_bUseToAll;
	}
	
}

⌨️ 快捷键说明

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