// PrhHistFindTextBase.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "DynamicDraw.h"
#include "UtilDlg.h"				// For FFSetDlgItemText.
#include "RegData.h"				// For g_pReg.
#include "PrhHistFindTextBase.h"	// This header.

// Superclass_xZkqqHx_iCmMjCoIiLgAiBeC_xHqqkZx_

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

//----- _xZkqqHx_iDiMiDfHiDfIiDgHiDiKjFnLjBlGjGlM_xHqqkZx_ -----
static const wchar_t* REG_PRH_HIST_FIND_TEXT_BASE = L"CFCPrhHistFindTextBase";

/////////////////////////////////////////////////////////////////////////////
// CFCPrhHistFindTextBase _xZkqqHx_iDfPiDeDiDeBiDiNiDeP_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::CFCPrhHistFindTextBase
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pWndResult	:_xZkqqHx_iMjPiNpFiMiLiJmKjFfMiOkGiDhAiDgMiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
CFCPrhHistFindTextBase::CFCPrhHistFindTextBase ()
					: BASE_CLASS()
{
	//{{AFX_DATA_INIT(CFCPrhHistFindTextBase)
	m_bTxbRegexp = FALSE;
	m_bTxbAsUppercase = FALSE;
	m_bTxbMultiWord = FALSE;
	//}}AFX_DATA_INIT

//----- 06.02.22 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiPiJiKpKiJlLiBeC_xHqqkZx_
//	m_cmbTxbFindString.Initialize(GetRegName(), L"m_cmbTxbFindString");
//----- 06.02.22 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
} // CFCPrhHistFindTextBase::CFCPrhHistFindTextBase.

void CFCPrhHistFindTextBase::DoDataExchange(CDataExchange* pDX)
{
	BASE_CLASS::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFCPrhHistFindTextBase)
	DDX_Control(pDX, IDC_HFD_TXB_CMB_FIND_STRING, m_cmbTxbFindString);
	DDX_Check(pDX, IDC_HFD_TXB_CHK_REGEXP, m_bTxbRegexp);
	DDX_Check(pDX, IDC_HFD_TXB_CHK_AS_UPPERCASE, m_bTxbAsUppercase);
	DDX_Check(pDX, IDC_HFD_TXB_CHK_MULTI_WORD, m_bTxbMultiWord);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CFCPrhHistFindTextBase, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCPrhHistFindTextBase)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCPrhHistFindTextBase _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::OnSetActive
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhJiBfLiDfHiCkKiDeBiDeOiDgFiDeCiDhFiCmJiCmIiCoJiCmGiCkLiCmJiMmEiCnBiPgPiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::OnSetActive ()
{
	// Superclass_xZkqqHx_iOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnSetActive();
	//----- _xZkqqHx_iDiMiDfHiDfIiDgHiDiKiCkJiCoHiPpDiLlFiCpAiOoGjDlOiClHiCoJ_xHqqkZx_ -----
	// _xZkqqHx_iDiMiDfHiDfIiDgHiDiKiCkJiCoHiPpDiLlFiCpAiOoGjDlOiClHiCoJiBeC_xHqqkZx_
	m_cmbTxbFindString.UpdateControl();
	// _xZkqqHx_iMjPiNpFjFlGiOjKjHpBiCpAiOoGjDlOiBeC_xHqqkZx_
	FFGetDlgItemText(this, IDC_HFD_TXB_CMB_FIND_STRING, m_wstrTxbFindString);
	g_pReg->LoadRegBinary(	GetRegName(),
							L"m_bTxbRegexp",
							(BYTE*)&m_bTxbRegexp,
							sizeof(m_bTxbRegexp));
	g_pReg->LoadRegBinary(	GetRegName(),
							L"m_bTxbAsUppercase",
							(BYTE*)&m_bTxbAsUppercase,
							sizeof(m_bTxbAsUppercase));
	g_pReg->LoadRegBinary(	GetRegName(),
							L"m_bTxbMultiWord",
							(BYTE*)&m_bTxbMultiWord,
							sizeof(m_bTxbMultiWord));
} // CFCPrhHistFindTextBase::OnSetActive.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::OnKillActive
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhJiBfLiDfHiCkKiDeBiDeOiDgFiDeCiDhFiCmFiCmIiCkNiCmIiCoJiCmGiCkLiCmJiMmEiCnBiPgPiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::OnKillActive ()
{
	//----- _xZkqqHx_iDiMiDfHiDfIiDgHiDiKiCmJiPpDiLlFiCpAjFnLjBlGiClHiCoJ_xHqqkZx_ -----
	m_cmbTxbFindString.UpdateRegistory();
	g_pReg->SaveRegBinary(	GetRegName(),
							L"m_bTxbRegexp",
							(BYTE*)&m_bTxbRegexp,
							sizeof(m_bTxbRegexp));
	g_pReg->SaveRegBinary(	GetRegName(),
							L"m_bTxbAsUppercase",
							(BYTE*)&m_bTxbAsUppercase,
							sizeof(m_bTxbAsUppercase));
	g_pReg->SaveRegBinary(	GetRegName(),
							L"m_bTxbMultiWord",
							(BYTE*)&m_bTxbMultiWord,
							sizeof(m_bTxbMultiWord));
	// Superclass_xZkqqHx_iOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnKillActive();
} // CFCPrhHistFindTextBase::OnKillActive.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::GetRegName
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiMiDfHiDfIiDgHiDiKjDgPjIfOiClHiCoJiClNiCnPiCmMjDgPjIfOjGlMiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiMiDfHiDfIiDgHiDiKjDgPjIfOiClHiCoJiClNiCnPiCmMjDgPjIfOjGlMiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const wchar_t* CFCPrhHistFindTextBase::GetRegName () const
{
	return REG_PRH_HIST_FIND_TEXT_BASE;
} // CFCPrhHistFindTextBase::GetRegName.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::UpdateControls
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFmPjAjEiCmMjCgMiCmFiBeBiDfCiDjDiDgHiDiNiBfLiDiLiCmMjFfMiOkGiCpAiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::UpdateControls ()
{
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::UpdateControls();
	// _xZkqqHx_iMjPiNpFjFlGiOjKjHpBiCpAjAnNjCoIiBeC_xHqqkZx_
	FFSetDlgItemText(this, IDC_HFD_TXB_CMB_FIND_STRING, m_wstrTxbFindString);
} // CFCPrhHistFindTextBase::UpdateControls.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::UpdateVariables
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmMjFfMiOkGiCmFiBeBjFmPjAjEiCmMjCgMiCpAiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::UpdateVariables ()
{
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::UpdateVariables();
	// _xZkqqHx_iMjPiNpFjFlGiOjKjHpBiCpAiOoGjDlOiBeC_xHqqkZx_
	FFGetDlgItemText(this, IDC_HFD_TXB_CMB_FIND_STRING, m_wstrTxbFindString);
} // CFCPrhHistFindTextBase::UpdateVariables.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::UpdateComboStr
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDeHiDgGiDeCiDgCiDgHiDhLiDgCiDeOiDfIjCiGiCmMjFlGiOjKjHpBiCpAiDiKiDfIiDgHiCnGiInKiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.11.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::UpdateComboStr ()
{
	// _xZkqqHx_iDgFiDeMiDfIiDgHiCpAiDiKiDfIiDgHiCmJjCmHiJmBiBeC_xHqqkZx_
	FFUpdateTextComboList(&m_cmbTxbFindString);
	// Superclass_xZkqqHx_iOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::UpdateComboStr();
} // CFCPrhHistFindTextBase::UpdateComboStr.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::UpdateActivate
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iKgFiDfCiDjDiDgHiDiNiBfLiDiLiCmMjHeMiMpIiBeFjGlDiMpIiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrhHistFindTextBase::UpdateActivate ()
{
	// m_bTbcLblNarrowByLabel_xZkqqHx_iBgJiDiJiDhIiDiLjFlGiOjKjHpBiCmFiNgJiCoIiNjOiCnNiBgKiCmMjCgMiCpAjFnLjBlGiClFiBeB_xHqqkZx_FALSE_xZkqqHx_iCpAiOhHjCoIiClHiCoJiBeC_xHqqkZx_
	// _xZkqqHx_iDiJiDhIiDiLjFlGiOjKjHpBiNgJiNjOiCnNiCpAiLnGiOhOiClHiCoJiClNiCnPiBeC_xHqqkZx_
	const FCAutoBackup<BOOL> backupNarrowByLabel(m_bTbcLblNarrowByLabel, FALSE);
	// Superclass_xZkqqHx_iOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::UpdateActivate();
	// _xZkqqHx_iDiJiDhIiDiLjFlGiOjKjHpBiCmFiNgJiCoIiNjOiCnNiCmNjFhDiJmCiBeC_xHqqkZx_
	GetDlgItem(IDC_HFD_TBC_LBL_CHK_NARROW_BY_LABEL)->EnableWindow(FALSE);
} // CFCPrhHistFindTextBase::UpdateActivate.

/////////////////////////////////////////////////////////////////////////////
// CFCPrhHistFindTextBase _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrhHistFindTextBase::OnInitDialog
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPiJiKpKiJlLiOjOiCmJiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.22 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCPrhHistFindTextBase::OnInitDialog ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnInitDialog();

	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiPiJiKpKiJlLiBeCiDfCiDjDiDfIiDgHiDiJiDeOiDfOiCmFiCmNiBeB_xHqqkZx_GetRegName_xZkqqHx_iKnGjAjEiCkK_xHqqkZx_
	// _xZkqqHx_jAlDiClFiCkCjCgMiCpAjFnEiClDiCmIiCkCiClNiCnPiBeBiClBiClBiCmFiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
	m_cmbTxbFindString.Initialize(GetRegName(), L"m_cmbTxbFindString");

	return TRUE;  // _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmJiDhEiDeIiBfLiDeKiDfIiCpAjAnNjCoIiClFiCmIiCkCiCmGiCkLiBeBjGnPiCoIjCgMiCmN_xHqqkZx_ TRUE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
	              // _xZkqqHx_jHoBiKeP_xHqqkZx_: OCX _xZkqqHx_iDhGiDiNiDhAiDgFiDeC_xHqqkZx_ _xZkqqHx_iDhJiBfLiDfHiCmMjGnPiCoIjCgMiCmN_xHqqkZx_ FALSE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
} // CFCPrhHistFindTextBase::OnInitDialog.
