// demoGetSavePathDlg.cpp: 实现文件
//

#include "stdafx.h"
#include "demoGetSavePathDlg.h"
#include "afxdialogex.h"
#include "resource.h"
#include "HwmSdkAgent.h"
#include "demoTools.h"

// demoGetSavePathDlg 对话框

IMPLEMENT_DYNAMIC(demoGetSavePathDlg, CDialogEx)

demoGetSavePathDlg::demoGetSavePathDlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_GET_SAVE_PATH, pParent)
    , m_pathType(0)
{

}

demoGetSavePathDlg::~demoGetSavePathDlg()
{
}

void demoGetSavePathDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Text(pDX, IDC_GET_SAVE_PATH_TYPE, m_pathType);
}


BEGIN_MESSAGE_MAP(demoGetSavePathDlg, CDialogEx)
    ON_BN_CLICKED(IDOK, &demoGetSavePathDlg::OnBnClickedOk)
END_MESSAGE_MAP()


// demoGetSavePathDlg 消息处理程序


void demoGetSavePathDlg::OnBnClickedOk()
{
    UpdateData(1);
    int ret = hwmsdkagent::GetUserSavePath((hwmsdkagent::HWMSavePathType)m_pathType);
    if (hwmsdk::HWM_COMMON_SUCCESS != ret)
    {
        CTools::OutputRetStr("GetUserSavePath error");
        return;
    }

    CDialogEx::OnOK();
}
