// Stc2Line.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

/*************************************************************************
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgFiDeMiDfIiDgHiCpAiCfBiNhDjFfMiOkGiClHiCoJiClNiCnPiCmMiDfCiDjDiDgHiDiNiBfLiDiLiBeC_xHqqkZx_
 *			_xZkqqHx_jFjEjFgJiCmMiDhGiDiNiDhAiDgFiDeCjFfMiOkGiDgDiBfLiDiLiDgPiBfLjHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/

#include "stdafx.h"
#include "DynamicDraw.h"
#include "UtilGraph.h"	// FCAutoDC.
#include "Stc2Line.h"	// This header.

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

/////////////////////////////////////////////////////////////////////////////
// CFCStc2Line

CFCStc2Line::CFCStc2Line ()
{
} // CFCStc2Line::CFCStc2Line.

CFCStc2Line::~CFCStc2Line ()
{
} // CFCStc2Line::~CFCStc2Line.

/////////////////////////////////////////////////////////////////////////////
// CFCStc2Line _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCStc2Line::SetText1
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iCfAiNhDjGnKiCmJjFfMiOkGiClHiCoJiDgFiDeMiDfIiDgHiCpAiOhHjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	tcpStr	:_xZkqqHx_iDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCStc2Line::SetText1 (const wchar_t* tcpStr)
{
	m_strText1 = tcpStr;
	Invalidate();
} // CFCStc2Line::SetText1.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCStc2Line::SetText2
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iCfBiNhDjGnKiCmJjFfMiOkGiClHiCoJiDgFiDeMiDfIiDgHiCpAiOhHjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	tcpStr	:_xZkqqHx_iDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCStc2Line::SetText2 (const wchar_t* tcpStr)
{
	m_strText2 = tcpStr;
	Invalidate();
} // CFCStc2Line::SetText2.


BEGIN_MESSAGE_MAP(CFCStc2Line, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCStc2Line)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCStc2Line _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCStc2Line::OnPaint
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFgAiJoGiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.08 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCStc2Line::OnPaint ()
{
	CPaintDC dc(this); // _xZkqqHx_jFgAiJoGjHhAiCmMiDgGiDgPiDeDiDfI_xHqqkZx_ _xZkqqHx_iDfCiDjDiDgFiDeMiDfIiDgHiBeC_xHqqkZx_
	FCAutoDC atDC(&dc, FALSE, 0, 0);
	// _xZkqqHx_iDgFiDeMiDfIiDgHjAeGiCpAjAnNjCoIiBeC_xHqqkZx_
	atDC.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
	// _xZkqqHx_iDgFiDeMiDfIiDgHjFgAiJoGiOjOiCmMiDiCiBfLiDgIiCpAjAnNjCoIiBeC_xHqqkZx_
	atDC.SetBkMode(TRANSPARENT);
	//----- _xZkqqHx_iDhEiDeIiDjDiDgHiCpAjAnNjCoI_xHqqkZx_ -----
	LOGFONT logFont;
	GetFont()->GetLogFont(&logFont);
	atDC.SetFont(&logFont);
	// _xZkqqHx_iDeOiDiJiDeDiDeBiDjDiDgHjHmMiIoGiCpAiOoGjDlOiBeC_xHqqkZx_
	CRect rect;
	GetClientRect(rect);
	//----- _xZkqqHx_iCfBiCmCiCmMiDgFiDeMiDfIiDgHiCmMjFgAiJoGjHmMiIoGiCpAiMhGiOfK_xHqqkZx_ -----
	CRect rt1 = rect;
	CRect rt2 = rect;
	int iHeight = rect.Height() / 2;
	rt1.bottom = rt1.top + iHeight;
	rt2.top = rt2.bottom - iHeight;
	rt1.left += 2;
	rt1.right -= 2;
	rt2.left += 2;
	rt2.right -= 2;
//----- 02.02.05 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	WString str;
//	FFGetWindowText(this, str);
//----- 02.02.05 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jEhHiMgJiCpAjDgIiCoIiCmCiCnEiClFiBeC_xHqqkZx_
	atDC.FillRect(rect, FCAtBrush(::GetSysColor(COLOR_3DFACE)));
//----- 02.09.15 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ (CodePage_xZkqqHx_iCmJjBmOiJjO_xHqqkZx_)-----
//	atDC.DrawText(m_strText1, rt1, DT_LEFT);
//	atDC.DrawText(m_strText2, rt2, DT_LEFT);
//----- 02.09.15 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ (CodePage_xZkqqHx_iCmJjBmOiJjO_xHqqkZx_)-----
	atDC.DrawText(m_strText1, CP_ACP, rt1, DT_LEFT);
	atDC.DrawText(m_strText2, CP_ACP, rt2, DT_LEFT);
//----- 02.09.15 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ (CodePage_xZkqqHx_iCmJjBmOiJjO_xHqqkZx_)-----
} // CFCStc2Line::OnPaint.
