// BtnPictText.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "dynamicdraw.h"
#include "UtilGraph.h"		// For FCAutoDC.
#include "BtnPictText.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFCBtnPictText

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::CFCBtnPictText
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDhEiDeIiDiLiDgHiDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
CFCBtnPictText::CFCBtnPictText ()
{
	// _xZkqqHx_iDiGiBfLiDfFjFmPjAjEiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
	m_hIcon = NULL;
	m_lIconWidth = 0;
	m_lIconHeight = 0;
	m_bIsIconLeft = TRUE;
	m_lIconTextGap = 0;
} // CFCBtnPictText::CFCBtnPictText.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::~CFCBtnPictText
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
CFCBtnPictText::~CFCBtnPictText ()
{
} // CFCBtnPictText::~CFCBtnPictText.


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

/////////////////////////////////////////////////////////////////////////////
// CFCBtnPictText _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::SetIcon
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFfMiOkGiClHiCoJiDeBiDeDiDfCiDjDiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	hIcon	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMiDgOiDjDiDgIiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
// *			lWidth	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMjFjNiCpAiOhHjCoIiBeC_xHqqkZx_
// *			lHeight	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMiNiCiClDiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void CFCBtnPictText::SetIcon (HICON hIcon, long lWidth, long lHeight)
//{
//	m_hIcon = hIcon;
//	m_lIconWidth = lWidth;
//	m_lIconHeight = lHeight;
//} // CFCBtnPictText::SetIcon.
//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::SetIcon
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFfMiOkGiClHiCoJiDeBiDeDiDfCiDjDiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	hIcon	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMiDgOiDjDiDgIiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lWidth	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMjFjNiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lHeight	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmMiNiCiClDiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsLeft	:_xZkqqHx_iDeBiDeDiDfCiDjDiCkKiNlGjBkEiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeBiJeFjBkEiCmMiPoKiNiHiCmN_xHqqkZx_FALSE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lGap	:_xZkqqHx_iDeBiDeDiDfCiDjDiCmGiDgFiDeMiDfIiDgHiCmMiDeNiDiDiDgCiDhGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCBtnPictText::SetIcon (HICON hIcon, long lWidth, long lHeight, BOOL bIsLeft, long lGap)
{
	m_hIcon = hIcon;
	m_lIconWidth = lWidth;
	m_lIconHeight = lHeight;
	m_bIsIconLeft = bIsLeft;
	m_lIconTextGap = lGap;
} // CFCBtnPictText::SetIcon.
//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----

//----- 06.03.19 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::SetIconTextGap
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeBiDeDiDfCiDjDiCmGiDgFiDeMiDfIiDgHiCmMiKnEiCmMiDeNiDiDiDgCiDhGiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lGap	:_xZkqqHx_iDeNiDiDiDgCiDhGiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void CFCBtnPictText::SetIconTextGap (long lGap)
//{
//	m_lIconTextGap = lGap;
//} // CFCBtnPictText::SetIconTextGap.
//----- 06.03.19 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/////////////////////////////////////////////////////////////////////////////
// CFCBtnPictText _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCBtnPictText::DrawItem
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhLiDfOiDjDiCpAjFgAiJoGiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDeBiDeDiDfCiDjDiCmGiDgFiDeMiDfIiDgHiCpAiCfAiCmCiCmMiDePiDiLiBfLiDhGiCmGiCnNiCmIiClHiBeC_xHqqkZx_
 *			_xZkqqHx_iBgJiDePiDiLiBfLiDhGjDoAiCmFiCmNiOhHjCoIiClDiCoKiClNiDeNiDiDiDgCiDhGiClOiCkPjHkDiClFiCmEjEhKjChFiBgK_xHqqkZx_
 *			_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCkKiDhLiDfOiDjDiCmMjCiGiJjLiCmJjEhKjChFiClDiCoKiCoJiCoGiCkEiCmJiMhGiOfKiClHiCoJiBeC_xHqqkZx_
 *
 *          _xZkqqHx_iDeBiDeDiDfCiDjDiCkKiNlGjBkEiCmMiPoKiNiH_xHqqkZx_
 *          _xZkqqHx_iBhLiBgDiBgDiBgDiEkGiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiEkGiBgDiBgDiBhL_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_lIconOffsetY                                    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_                                                _xZkqqHx_iEkA_xHqqkZx_lTextOffsetY
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkIiEjPiEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_                              _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkCiEjPiEkI_xHqqkZx_    _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_    ICON    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_        TEXT        _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                              _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_ lOffsetX _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkFiEjPiEjPiEkH_xHqqkZx_                              _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_         m_lIconTextGap                           _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBhLiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBhL_xHqqkZx_
 *
 *          _xZkqqHx_iDeBiDeDiDfCiDjDiCkKiJeFjBkEiCmMiPoKiNiH_xHqqkZx_
 *          _xZkqqHx_iBhLiBgDiBgDiBgDiEkGiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiEkGiBgDiBgDiBhL_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_                                                _xZkqqHx_iEkA_xHqqkZx_lIconOffsetY
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_lTextOffsetY                                    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_                              _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkCiEjPiEkI_xHqqkZx_    _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_      _xZkqqHx_iEkIiEjPiEkBiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_        TEXT        _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_    ICON    _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_            _xZkqqHx_iEkA_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_          _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBeG_xHqqkZx_ lOffsetX _xZkqqHx_iEkA_xHqqkZx_                    _xZkqqHx_iEkFiEjPiEjPiEkH_xHqqkZx_                      _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_                 m_lIconTextGap                   _xZkqqHx_iBeG_xHqqkZx_
 *          _xZkqqHx_iBhLiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBgDiBhL_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.12.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCBtnPictText::DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
{
//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	// _xZkqqHx_jFgAiJoGiDfIiDfOiDeDiDiLiBeC_xHqqkZx_
//	UINT uStyle = DFCS_BUTTONPUSH;
//
//	// This code only works with buttons.
//	ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON);
//	if (lpDrawItemStruct->itemState & ODS_SELECTED)
//	//----- _xZkqqHx_iDhLiDfOiDjDiCpAiJjPiClFiClNiPpDjBnEiCmMiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_jFgAiJoGiDfIiDfOiDeDiDiLiCmJiJjPiClFiClNiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
//		uStyle |= DFCS_PUSHED;
//	}
//
//	// _xZkqqHx_iDhLiDfOiDjDiCmMiDhEiDiMiBfLiDiAiCpAjFgAiJoGiBeC_xHqqkZx_
//	::DrawFrameControl(	lpDrawItemStruct->hDC,
//						&lpDrawItemStruct->rcItem,
//						DFC_BUTTON,
//						uStyle);
//
//	// _xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDgFiDeMiDfIiDgHiCpAiOoGjDlOiBeC_xHqqkZx_
//	CString strText;
//	GetWindowText(strText);
//
//	// _xZkqqHx_jFgAiJoGiClHiCoJiDeBiDeDiDfCiDjDiCmMiNmAjFfHiBeC_xHqqkZx_
//	CRect rtIcon(0, 0, 0, 0);
//	if (m_hIcon != NULL)
//	{
//		rtIcon = CRect(	0,
//						0,
//						m_lIconWidth, 
//						m_lIconHeight);
//	}
//
//	// _xZkqqHx_jFgAiJoGiClHiCoJiDgFiDeMiDfIiDgHiCmMiNmAjFfHiBeC_xHqqkZx_
//	CRect rtText(0, 0, 0, 0);
//	if (!strText.IsEmpty())
//	{
//		// _xZkqqHx_iDhLiDfOiDjDiCmJjFgAiJoGiClDiCoKiCoJiDeFiDeCiDjDiDgIiDeFiDgFiDeMiDfIiDgHiCmMiDfEiDeDiDfJiCpAiMhGiOfKiBeC_xHqqkZx_
//		rtText = CRect(	0,
//						0,
//						CRect(lpDrawItemStruct->rcItem).Width(),
//						CRect(lpDrawItemStruct->rcItem).Height());
//		::DrawText(	lpDrawItemStruct->hDC,
//					strText,
//					strText.GetLength(),
//					rtText,
//					DT_SINGLELINE|DT_VCENTER|DT_CENTER|DT_CALCRECT);
//	}
//
//	long lOffsetX = (CRect(lpDrawItemStruct->rcItem).Width() - (rtText.Width() + m_lIconTextGap + rtIcon.Width())) / 2;
//	long lIconOffsetY = (CRect(lpDrawItemStruct->rcItem).Height() - rtIcon.Height()) / 2;
//	long lTextOffsetY = (CRect(lpDrawItemStruct->rcItem).Height() - rtText.Height()) / 2;
//
//	rtIcon += CSize(lOffsetX, lIconOffsetY);
//	rtText += CSize(lOffsetX + m_lIconTextGap + m_lIconWidth, lTextOffsetY);
//
//	if (lpDrawItemStruct->itemState & ODS_SELECTED)
//	//----- _xZkqqHx_iDhLiDfOiDjDiCpAiJjPiClFiClNiPpDjBnEiCmMiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_jFgAiJoGiClHiCoJiDeBiDeDiDfCiDjDiCpAiJeFiJlKiCnGiInKjDkOiClHiCoJiBeC_xHqqkZx_
//		rtIcon += CSize(1,1);
//		// _xZkqqHx_jFgAiJoGiClHiCoJiDgFiDeMiDfIiDgHiCpAiJeFiJlKiCnGiInKjDkOiClHiCoJiBeC_xHqqkZx_
//		rtText += CSize(1,1);
//	}
//
//	// _xZkqqHx_iDeBiDeDiDfCiDjDiCpAjFgAiJoGiBeC_xHqqkZx_
//	if (m_hIcon != NULL)
//		::DrawIconEx(	lpDrawItemStruct->hDC,
//						rtIcon.left,
//						rtIcon.top,
//						m_hIcon,
//						m_lIconWidth,
//						m_lIconHeight,
//						0, NULL, DI_NORMAL);
//
//	// _xZkqqHx_iDgFiDeMiDfIiDgHiCpAjFgAiJoGiBeC_xHqqkZx_
//	if (!strText.IsEmpty())
//		::DrawText(	lpDrawItemStruct->hDC,
//					strText,
//					strText.GetLength(),
//					rtText,
//					DT_SINGLELINE|DT_VCENTER|DT_CENTER);
//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	// This code only works with buttons.
	ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON);
	// _xZkqqHx_jFgAiJoGiDfIiDfOiDeDiDiLiBeC_xHqqkZx_
	UINT uStyle = DFCS_BUTTONPUSH;
	if (lpDrawItemStruct->itemState & ODS_SELECTED)
	//----- _xZkqqHx_iDhLiDfOiDjDiCpAiJjPiClFiClNiPpDjBnEiCmMiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jFgAiJoGiDfIiDfOiDeDiDiLiCmJiJjPiClFiClNiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
		uStyle |= DFCS_PUSHED;
	}
	// _xZkqqHx_iDhLiDfOiDjDiCmMiDhEiDiMiBfLiDiAiCpAjFgAiJoGiBeC_xHqqkZx_
	::DrawFrameControl(	lpDrawItemStruct->hDC,
						&lpDrawItemStruct->rcItem,
						DFC_BUTTON,
						uStyle);

	// _xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDgFiDeMiDfIiDgHiCpAiOoGjDlOiBeC_xHqqkZx_
	CString strText;
	GetWindowText(strText);

	// _xZkqqHx_jFgAiJoGiClHiCoJiDeBiDeDiDfCiDjDiCmMiNmAjFfHiBeC_xHqqkZx_
	CRect rtIcon(0, 0, 0, 0);
	if (m_hIcon != NULL)
	{
		rtIcon.SetRect(	0,
						0,
						m_lIconWidth, 
						m_lIconHeight);
	}

	// _xZkqqHx_jFgAiJoGiClHiCoJiDgFiDeMiDfIiDgHiCmMiNmAjFfHiBeC_xHqqkZx_
	CRect rtText(0, 0, 0, 0);
	if (!strText.IsEmpty())
	{
		// _xZkqqHx_iDhLiDfOiDjDiCmJjFgAiJoGiClDiCoKiCoJiDeFiDeCiDjDiDgIiDeFiDgFiDeMiDfIiDgHiCmMiDfEiDeDiDfJiCpAiMhGiOfKiBeC_xHqqkZx_
		rtText = CRect(	0,
						0,
						CRect(lpDrawItemStruct->rcItem).Width(),
						CRect(lpDrawItemStruct->rcItem).Height());
		::DrawText(	lpDrawItemStruct->hDC,
					strText,
					strText.GetLength(),
					rtText,
					DT_SINGLELINE|DT_VCENTER|DT_CENTER|DT_CALCRECT);
	}
	// _xZkqqHx_iDeBiDeDiDfCiDjDiCmGiDgFiDeMiDfIiDgHiCmMiDeNiDiDiDgCiDhGiBeCiCmHiClPiCoHiCkJjGlDiCkCiPoKiNiHiCmNiCePiBeC_xHqqkZx_
	const long lIconTextGap = (m_hIcon == NULL || strText.IsEmpty()) ? 0 : m_lIconTextGap;
	// _xZkqqHx_jFgAiJoGjHmMiIoGiCmMjFjNiCkJiCoHiBgJiDeBiDeDiDfCiDjDiBhLiDgFiDeMiDfIiDgHiBgKjFjNiCpAiIpIiCkCiClNjCgMiCmMjElMjFkKiCkKiDeBiDeDiDfCiDjDiDgFiDeMiDfIiDgHiDePiDiLiBfLiDhGiCmMiChHjFpLiMpMiDeJiDhEiDfKiDgCiDgHiBeC_xHqqkZx_
	long lOffsetX = (CRect(lpDrawItemStruct->rcItem).Width() - (rtText.Width() + lIconTextGap + rtIcon.Width())) / 2;
	// _xZkqqHx_iDeBiDeDiDfCiDjDiCmMiChIjFpLiMpMiDeJiDhEiDfKiDgCiDgHiBeC_xHqqkZx_
	long lIconOffsetY = (CRect(lpDrawItemStruct->rcItem).Height() - rtIcon.Height()) / 2;
	// _xZkqqHx_iDgFiDeMiDfIiDgHiCmMiChIjFpLiMpMiDeJiDhEiDfKiDgCiDgHiBeC_xHqqkZx_
	long lTextOffsetY = (CRect(lpDrawItemStruct->rcItem).Height() - rtText.Height()) / 2;
	if (m_bIsIconLeft)
	//----- _xZkqqHx_iDeBiDeDiDfCiDjDiCkKiNlGjBkEiCmMiPoKiNiH_xHqqkZx_ -----
	{
		rtIcon += CSize(lOffsetX, lIconOffsetY);
		rtText += CSize(lOffsetX + rtIcon.Width() + m_lIconTextGap, lTextOffsetY);
	} else
	//----- _xZkqqHx_iDeBiDeDiDfCiDjDiCkKiJeFjBkEiCmMiPoKiNiH_xHqqkZx_ -----
	{
		rtText += CSize(lOffsetX, lTextOffsetY);
		rtIcon += CSize(lOffsetX + rtText.Width() + m_lIconTextGap, lIconOffsetY);
	}

	if (lpDrawItemStruct->itemState & ODS_SELECTED)
	//----- _xZkqqHx_iDhLiDfOiDjDiCpAiJjPiClFiClNiPpDjBnEiCmMiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jFgAiJoGiClHiCoJiDeBiDeDiDfCiDjDiCpAiJeFiJlKiCnGiInKjDkOiClHiCoJiBeC_xHqqkZx_
		rtIcon += CSize(1,1);
		// _xZkqqHx_jFgAiJoGiClHiCoJiDgFiDeMiDfIiDgHiCpAiJeFiJlKiCnGiInKjDkOiClHiCoJiBeC_xHqqkZx_
		rtText += CSize(1,1);
	}

	// _xZkqqHx_iDeBiDeDiDfCiDjDiCpAjFgAiJoGiBeC_xHqqkZx_
	if (m_hIcon != NULL)
		::DrawIconEx(	lpDrawItemStruct->hDC,
						rtIcon.left,
						rtIcon.top,
						m_hIcon,
						m_lIconWidth,
						m_lIconHeight,
						0, NULL, DI_NORMAL);

	// _xZkqqHx_iDgFiDeMiDfIiDgHiCpAjFgAiJoGiBeC_xHqqkZx_
	if (!strText.IsEmpty())
		::DrawText(	lpDrawItemStruct->hDC,
					strText,
					strText.GetLength(),
					rtText,
					DT_SINGLELINE|DT_VCENTER|DT_CENTER);
//----- 06.03.19 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
} // CFCBtnPictText::DrawItem.

