VS2017工程代码链接如下:
https://download.csdn.net/download/wzhrsh/12064095
// face_mfcDlg.cpp: 实现文件
//
#include "stdafx.h"
#include "face_mfc.h"
#include "face_mfcDlg.h"
#include "afxdialogex.h"
#include <cmath>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_ABOUTBOX };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CfacemfcDlg 对话框
CfacemfcDlg::CfacemfcDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_FACE_MFC_DIALOG, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CfacemfcDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CfacemfcDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_open, &CfacemfcDlg::OnBnClickedopen)
ON_BN_CLICKED(IDC_colse, &CfacemfcDlg::OnBnClickedcolse)
ON_BN_CLICKED(IDC_BTN_GETIMAGE, &CfacemfcDlg::OnBnClickedBtnGetimage)
ON_BN_CLICKED(IDC_BTN_DETECT, &CfacemfcDlg::OnBnClickedBtnDetect)
ON_BN_CLICKED(IDC_BTN_FACEALG, &CfacemfcDlg::OnBnClickedBtnFacealg)
END_MESSAGE_MAP()
// CfacemfcDlg 消息处理程序
BOOL CfacemfcDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// 将“关于...”菜单项添