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

#include "stdafx.h"
#include "demoSetShareAudioDlg.h"
#include "afxdialogex.h"
#include "demo.h"
#include "HwmSdkAgent.h"


// demoSetShareAudioDlg 对话框

IMPLEMENT_DYNAMIC(demoSetShareAudioDlg, CDialogEx)

demoSetShareAudioDlg::demoSetShareAudioDlg(CWnd* pParent /*=NULL*/)
	: CDialogEx(IDD_SET_SHARE_AUDIO, pParent)
{

}

demoSetShareAudioDlg::~demoSetShareAudioDlg()
{
}

void demoSetShareAudioDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_RADIO_ENABLE_OPEN, m_isEnable);
}


BEGIN_MESSAGE_MAP(demoSetShareAudioDlg, CDialogEx)
    ON_BN_CLICKED(IDC_BUTTON_SET_SHARE_AUDIO2, &demoSetShareAudioDlg::OnBnClickedButtonSetShareAudio)
END_MESSAGE_MAP()


// demoSetShareAudioDlg 消息处理程序


void demoSetShareAudioDlg::OnBnClickedButtonSetShareAudio()
{
    bool isCheck = m_isEnable.GetCheck() == 1 ? true : false;
    int ret = hwmsdkagent::SetShareAudio(isCheck);
    if (hwmsdk::HWM_COMMON_SUCCESS != ret)
    {
        AfxMessageBox(_T("Set Share Audio Result failed"));
    }
}


BOOL demoSetShareAudioDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();

    // TODO:  在此添加额外的初始化
    m_isEnable.SetCheck(1);

    return TRUE;  // return TRUE unless you set the focus to a control
                  // 异常: OCX 属性页应返回 FALSE
}
