// DLG_SendMms_Input.cpp : implementation file
//

#include "stdafx.h"
#include "corpsms.h"
#include "DLG_SendMms_Input.h"

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

/////////////////////////////////////////////////////////////////////////////
// DLG_SendMms_Input dialog


DLG_SendMms_Input::DLG_SendMms_Input(CWnd* pParent /*=NULL*/)
	: CDialog(DLG_SendMms_Input::IDD, pParent)
{
	//{{AFX_DATA_INIT(DLG_SendMms_Input)
	m_strMsg = _T("");
	//}}AFX_DATA_INIT
}


void DLG_SendMms_Input::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(DLG_SendMms_Input)
	DDX_Text(pDX, IDC_SENDMMS_INPUT_MSG, m_strMsg);
	DDV_MaxChars(pDX, m_strMsg, 65535);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(DLG_SendMms_Input, CDialog)
	//{{AFX_MSG_MAP(DLG_SendMms_Input)
	//}}AFX_MSG_MAP
	ON_BN_CLICKED(IDC_SEND_INPUT_INNAME, &DLG_SendMms_Input::OnBnClickedSendInputInname)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DLG_SendMms_Input message handlers

void DLG_SendMms_Input::OnOK() 
{
	if (!UpdateData(true))
		return;
	CDialog::OnOK();
}


void DLG_SendMms_Input::OnBnClickedSendInputInname()
{

	CEdit * pEdit = (CEdit *)GetDlgItem(IDC_SENDMMS_INPUT_MSG);
	if (pEdit)
	{

		pEdit->SendMessage(EM_REPLACESEL, false, (LPARAM)(LPCTSTR)_T("\"%Name%\""));

	}
}