#if !defined(AFX_MATRIXCONTROL_H__F5A5ADEE_7AD0_4338_B3C8_44D91260A1F8__INCLUDED_)
#define AFX_MATRIXCONTROL_H__F5A5ADEE_7AD0_4338_B3C8_44D91260A1F8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MatrixControl.h : _xZkqqHx_iDhHiDgCiDfPiBfL_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "WndBase.h"	// For Baseclass.

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS CFCWndBase

/////////////////////////////////////////////////////////////////////////////
// CFCMatrixControl _xZkqqHx_iDeFiDeCiDjDiDgIiDeF_xHqqkZx_

/*****************************************************************

  GROUP_MARGIN        GROUP_MARGIN
 _xZkqqHx_iBfBiBfBiBfBiEkAiBfBiBfBiBfBiBfBiBfBiBfBiBfBiEkAiBfBiBfBiEkAiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfBiBfB_xHqqkZx_        _xZkqqHx_iBfBiBfBiBfBiBfBiBfB_xHqqkZx_
|      _xZkqqHx_iEkA_xHqqkZx_  TextHeight  _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                _xZkqqHx_iBkK_xHqqkZx_SPACE_Y/2   |               _xZkqqHx_iBkK_xHqqkZx_
|    _xZkqqHx_iBkJiEjPiBkIiBkJiEjPiEjPiEjPiBkIiBkJiEjPiBkIiBkJiEjPiBkI_xHqqkZx_              _xZkqqHx_iBkL_xHqqkZx_            |       _xZkqqHx_iBfBiBfBiBfB_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkK_xHqqkZx_  |           _xZkqqHx_iBkK_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiEkA_xHqqkZx_GROUP_MARGIN  _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_        _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiBkLiBfB_xHqqkZx_|           _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkB_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiBkK_xHqqkZx_  |           _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkB_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_   _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiEkA_xHqqkZx_  |           _xZkqqHx_iEkA_xHqqkZx_ TotalGroupHeaderHeight
|    _xZkqqHx_iBkA_xHqqkZx_    _xZkqqHx_iBkBiBkBiBkBiBkBiBkB_xHqqkZx_    _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_ _xZkqqHx_iChDiCgEiChHiChD_xHqqkZx_            _xZkqqHx_iBkBiEkA_xHqqkZx_TextHeight    _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_        _xZkqqHx_iBkB_xHqqkZx_        _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiEkA_xHqqkZx_  |          GroupHeaderHeight
|    _xZkqqHx_iBkA_xHqqkZx_        _xZkqqHx_iBkB_xHqqkZx_        _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiBkLiBfB_xHqqkZx_|           _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_                  _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiBkK_xHqqkZx_  |           _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkA_xHqqkZx_                  _xZkqqHx_iBkBiBkA_xHqqkZx_   _xZkqqHx_iBeG_xHqqkZx_                     _xZkqqHx_iBkBiEkA_xHqqkZx_GROUP_MARGIN  _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkL_xHqqkZx_  |           _xZkqqHx_iBkL_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|                                                _xZkqqHx_iBkK_xHqqkZx_          |       _xZkqqHx_iBfAiBfAiBfA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|                                                _xZkqqHx_iEkA_xHqqkZx_          |               _xZkqqHx_iBkL_xHqqkZx_
|                                                _xZkqqHx_iEkA_xHqqkZx_SPACE_Y   |       _xZkqqHx_iBfAiBfAiBfAiBfAiBfA_xHqqkZx_
|                                                _xZkqqHx_iBkL_xHqqkZx_          |
|    _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkB_xHqqkZx_ _xZkqqHx_iBkK_xHqqkZx_     _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkB_xHqqkZx_    |
|    _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkAiBkJiBkI_xHqqkZx_|
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_SPACE_X/2
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |
|    _xZkqqHx_iBkBiBkBiBjEiCgIiCgMiCgAiCgGiCgEiBjEiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBjEiCgIiCgMiCgAiCgGiCgEiBjEiBkAiBkA_xHqqkZx_    |
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |      _xZkqqHx_iBfBiBfBiBfB_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBkAiBkAiBkK_xHqqkZx_  |          _xZkqqHx_iBkK_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_             MIN_ITEM_H   _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkAiBkL_xHqqkZx_TEXT_MARGIN  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkAiBkK_xHqqkZx_  |          _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_   _xZkqqHx_iChDiCgEiChHiChD_xHqqkZx_   _xZkqqHx_iBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkB_xHqqkZx_   _xZkqqHx_iChDiCgEiChHiChD_xHqqkZx_   _xZkqqHx_iBkAiBkAiEkA_xHqqkZx_TextHeight   TotalTextHeight
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkAiBkL_xHqqkZx_  |          _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkAiBkK_xHqqkZx_TEXT_MARGIN  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkAiBkL_xHqqkZx_  |          _xZkqqHx_iBkL_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_ _xZkqqHx_iEkA_xHqqkZx_     _xZkqqHx_iBkBiBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_    |      _xZkqqHx_iBfAiBfAiBfA_xHqqkZx_
|    _xZkqqHx_iBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_ _xZkqqHx_iBkL_xHqqkZx_     _xZkqqHx_iBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_    |
|    _xZkqqHx_iBkJiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiBkI_xHqqkZx_                      _xZkqqHx_iBkK_xHqqkZx_          |
|           m_nItemW                             _xZkqqHx_iEkA_xHqqkZx_          |
|                                                _xZkqqHx_iEkA_xHqqkZx_SPACE_Y   |
|                                                _xZkqqHx_iBkL_xHqqkZx_          |      _xZkqqHx_iBfBiBfBiBfBiBfBiBfB_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkB_xHqqkZx_        _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkB_xHqqkZx_    |              _xZkqqHx_iBkK_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkA_xHqqkZx_    |      _xZkqqHx_iBfBiBfBiBfB_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |          _xZkqqHx_iBkK_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |      IN  _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBjEiCgIiCgMiCgAiCgGiCgEiBjEiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBjEiCgIiCgMiCgAiCgGiCgEiBjEiBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBjEiBjEiBjEiBjEiBjEiBjEiBjEiBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  TotalItemHeight
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_   _xZkqqHx_iChDiCgEiChHiChD_xHqqkZx_   _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_   _xZkqqHx_iChDiCgEiChHiChD_xHqqkZx_   _xZkqqHx_iBkAiBkA_xHqqkZx_    |          ItemHeight
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkB_xHqqkZx_              _xZkqqHx_iBkAiBkA_xHqqkZx_    |          _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkK_xHqqkZx_  |      IN  _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|    _xZkqqHx_iBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkA_xHqqkZx_        _xZkqqHx_iBkBiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkAiBkL_xHqqkZx_EDGE_W       _xZkqqHx_iBkL_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|_xZkqqHx_iBkJiBkI_xHqqkZx_        _xZkqqHx_iBkK_xHqqkZx_            _xZkqqHx_iBkJiEjPiEjPiBkI_xHqqkZx_                  _xZkqqHx_iBkJiBkI_xHqqkZx_    |      _xZkqqHx_iBfAiBfAiBfA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_
|SPACE_X/2   _xZkqqHx_iBkL_xHqqkZx_SPACE_Y/2   SPACE_X                  EDGE_W   |              _xZkqqHx_iBkL_xHqqkZx_
 _xZkqqHx_iBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfAiBfA_xHqqkZx_       _xZkqqHx_iBfAiBfAiBfAiBfAiBfA_xHqqkZx_

******************************************************************/

#define FDMC_SPACE_X	4	// _xZkqqHx_iLpEjAjEiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
#define FDMC_SPACE_Y	4	// _xZkqqHx_iLpEjAjEiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
//----- 06.11.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#define FDMC_SPACE_X	2	// Must be 2 * FDMC_MARGIN_X
//#define FDMC_SPACE_Y	2	// Must be 2 * FDMC_MARGIN_Y
//----- 06.11.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
#define FDMC_EDGE_W		2
//----- 06.11.06 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
#define FDMC_TEXT_MARGIN	2
#define FDMC_GROUP_MARGIN	5
//----- 06.11.06 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCMCItemData
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeBiDeDiDgFiDiAiPoOjFpBiCpAjFnLjBlGiClHiCoJiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
struct FCMCItemData
{
	FCMCItemData () : wState(0), dwData(0) {}
	FCMCItemData (WORD w, DWORD dw) : wState(w), dwData(dw) {}
	WORD	wState;		// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiPpDjBnEiBeC_xHqqkZx_FDMC_FLAG_XXX_xZkqqHx_iBeC_xHqqkZx_
	DWORD	dwData;		// _xZkqqHx_iDeBiDeDiDgFiDiAiDgGiBfLiDfOiBeC_xHqqkZx_
};

typedef vector<FCMCItemData>	FDItemDataVector;

// _xZkqqHx_iDeBiDeDiDgFiDiAiPpDjBnEiBeC_xHqqkZx_
#define FDMC_FLAG_SELECT	WORD(0x0001 << 0)		// _xZkqqHx_jBeJjBpAiPpDjBnEiBeC_xHqqkZx_
#define FDMC_FLAG_CUT		WORD(0x0001 << 1)		// CUT_xZkqqHx_iPiIjHjNjCiGiBeC_xHqqkZx_
#define FDMC_FLAG_REDRAW	WORD(0x0001 << 7)		// _xZkqqHx_iNmEjFgAiJoGiDhEiDiJiDePiBeC_xHqqkZx_

//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCMCGroupData
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGiPoOjFpBiCpAjFnLjBlGiClHiCoJiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
struct FCMCGroupData
{
//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	FCMCGroupData () : lItemCount(0), wState(0), dwData(0) {}
//	FCMCGroupData (long l, WORD w, DWORD dw) : lItemCount(l), wState(w), dwData(dw) {}
//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	FCMCGroupData () : lItemCount(0), dwData(0) {}
	FCMCGroupData (long l, DWORD dw) : lItemCount(l), dwData(dw) {}
//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	long	lItemCount;		// _xZkqqHx_iDePiDiLiBfLiDhGiCmJiKnMiCnMiCoKiCoJiDeBiDeDiDgFiDiAjAjEiBeC_xHqqkZx_
// 06.11.08 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	WORD	wState;
	DWORD	dwData;			// _xZkqqHx_iDePiDiLiBfLiDhGiDgGiBfLiDfOiBeC_xHqqkZx_
};

typedef vector<FCMCGroupData>	FDGroupDataVector;

// 06.11.08 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FDMC_GROUP_EXTENDED	WORD(0x0001 << 0)
//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// Create_xZkqqHx_iKnGjAjEiCmM_xHqqkZx_dwMyStyle_xZkqqHx_iCmJiOhHjCoIiClHiCoJiDhEiDiJiDePiBeC_xHqqkZx_
#define FDGMC_STYLE_GROUP			(0x00000001L << 0)	// _xZkqqHx_iDePiDiLiBfLiDhGiDfIiDfOiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
														// _xZkqqHx_iDeBiDeDiDgFiDiAiCkKiDePiDiLiBfLiDhGjCfAiImKiCmJiCmIiCoJiBeC_xHqqkZx_
#define FDGMC_STYLE_FIXED_ITEM_SIZE	(0x00000001L << 1)	// _xZkqqHx_iMmFjCoIiDeBiDeDiDgFiDiAiDfEiDeDiDfJiDfIiDfOiDeDiDiLiBeC_xHqqkZx_
														// _xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDiKiDfEiDeDiDfJiCmFiCoA_xHqqkZx_
														// _xZkqqHx_iDeBiDeDiDgFiDiAiDfEiDeDiDfJiCmNiMmFjCoIiBeC_xHqqkZx_

//----- 06.11.08 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCUniqIDAndExpanded
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGiCmMjDfHiKeKiPoOjFpBiBeCiDePiDiLiBfLiDhGiDiMiDfCiBfLiDgIiCmNjFhAjEmJiCmJiNoNiPjMiBjFjCmHiJmBiClDiCoKiCoJ_xHqqkZx_
 *			_xZkqqHx_iCmMiCmFiBeBjDfHiKeKiPoOjFpBiCmNjFmKiCmJjFnLjBlGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.08 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
struct FCUniqIDAndExpanded
{
	FCUniqIDAndExpanded () : m_dwUniqID(DWORD(-1)), m_bIsExpanded(TRUE) {}
	FCUniqIDAndExpanded (DWORD dwUniqID, BOOL bIsExpanded)
						: m_dwUniqID(dwUniqID), m_bIsExpanded(bIsExpanded) {}
	DWORD	m_dwUniqID;		// FCEnv_xZkqqHx_iCmJjFnLjBlGiClDiCoKiCmEiCkCiCoJiDePiDiLiBfLiDhGiCmMiDiGiDgKiBfLiDeO_xHqqkZx_ID_xZkqqHx_iCpA_xHqqkZx_
							// _xZkqqHx_iLeMjIfOiBeCiDePiDiLiBfLiDhGiNoNiPjMiBjFjCmHiJmBiOjOiCmJiPmGiCoHiClFiNiHiCoNiClJiCmE_xHqqkZx_
							// _xZkqqHx_jDkPiClGiDePiDiLiBfLiDhGiCkJjClCiCnHiCoJiBeC_xHqqkZx_
	BOOL	m_bIsExpanded;	// _xZkqqHx_jDfHiKeKiPpDjBnEiCkJiBeI_xHqqkZx_
}; // struct FCUniqIDAndExpanded.
//----- 06.11.08 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	CFCMatrixControl
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDgHiDiKiDgCiDeOiDfIiDfCiDjDiDgHiDiNiBfLiDiLiCmMiKoOjGhLiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.02.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
class CFCMatrixControl : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

// _xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfGiDiHiDjD_xHqqkZx_
public:
	CFCMatrixControl();

// _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_
public:
	virtual BOOL Create (DWORD dwExStyle,
						DWORD dwStyle,
// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
						DWORD dwMyStyle,
						const RECT& rt,
						CWnd* pParentWnd,
						UINT nID,
						CCreateContext* pContext = NULL,
						CWnd* wndpMsgWnd = NULL);
public:
//----- 07.01.20 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//// 06.11.07 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
////	virtual void	ClearContents ();
//----- 07.01.20 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	virtual void	ClearContents ();
//----- 07.01.20 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----

// 06.11.08 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual BOOL	GetIsSingleSelect () const;

//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual BOOL	GetIsGroupStyle () const;
	virtual long	GetColumnCount () const;
	virtual long	AddGroup (DWORD dwGroupData);
	virtual long	AddItem (long lGroupIndex, DWORD dwData);
	virtual void	InsertItem (long lGroupIndex, long lIndex, DWORD dwData);
	virtual void	DeleteItem (long lGroupIndex, long lIndex);
	virtual void	GetGroupItemIndex (long& lIndexBegin, long& lIndexEnd, long lGroupIndex) const;
	virtual CRect	GetGlobalItemRect (long lIndex) const;
	virtual long	GetGroupItemLines (long lGroupIndex) const;
	virtual long	ItemIndexToGroupIndex (long lIndex) const;
	virtual CRect	GetGlobalGroupRect (long lGroupIndex) const;
	virtual CRect	GetGroupRect (long lIndex) const;
	virtual long	GroupDataToIndex (DWORD dwGroupData) const;
	virtual long	GetGroupCount () const;
	virtual DWORD	GetGroupData (long lGroupIndex) const;
	virtual long	GetGroupItemCount (long lGroupIndex) const;
//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	virtual WORD	GetGroupState (long lGroupIndex) const;
//	virtual void	SetGroupState (long lGroupIndex, WORD wState);
//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	virtual BOOL	GetIsGroupExpanded (long lGroupIndex) const;
	virtual void	SetIsGroupExpanded (long lGroupIndex, BOOL bIsExpanded);
	virtual DWORD	GetGroupUniqID (DWORD dwGroupData) const;

//----- 06.11.08 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iDfOiDeDiDhG_xHqqkZx_>	FPEnumGroupProc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	EnumGroup_xZkqqHx_iKnGjAjEiCmMiDfCiBfLiDiLiDgPiDgCiDeOiDhGiDiNiDfGiDfHiDiDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pControl			:CFCMatrixControl_xZkqqHx_iDeOiDiJiDfIiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lGroupIndex			:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDePiDiLiBfLiDhGiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsExpanded			:_xZkqqHx_iDePiDiLiBfLiDhGiCkKjDfHiKeKjCiGiCkJiCmHiCkEiCkJiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndexBegin		:_xZkqqHx_iDePiDiLiBfLiDhGiCmJjBkOiClHiCoJiNmFiPiJiCmMiDeBiDeDiDgFiDiAiCmMiDeDiDjDiDgGiDgCiDeOiDfI_xHqqkZx_
 *								 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndexEnd		:_xZkqqHx_iDePiDiLiBfLiDhGiCmJjBkOiClHiCoJiNmFiMoDiCmMiDeBiDeDiDgFiDiAiCmM_xHqqkZx_
 *								 _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiBhLiCfAiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lVisibleLineBegin	:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiNmFiPiJiCmMiNhDiCmMiBeBiJmCiOiLiDeBiDeDiDgFiDiA_xHqqkZx_
 *								 _xZkqqHx_iBgJjDfHiKeKjCiGiCmMiDePiDiLiBfLiDhGiBgKiCmMiCnNiCmFjBfDjBmMiCmFiCmM_xHqqkZx_
 *								 _xZkqqHx_iNhDiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lVisibleLineEnd		:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiNmFiMoDiCmMiNhDiBhLiCfAiCmMiBeBiJmCiOiLiDeBiDeDiDgFiDiA_xHqqkZx_
 *								 _xZkqqHx_iBgJjDfHiKeKjCiGiCmMiDePiDiLiBfLiDhGiBgKiCmMiCnNiCmFjBfDjBmMiCmFiCmM_xHqqkZx_
 *								 _xZkqqHx_iNhDiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			rtGroup				:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiLoJiMgAiNmAjFfHiCpAiOhHjCoIiBeCiDePiDiNiBfLiDgPiDiL_xHqqkZx_
 *								 _xZkqqHx_iNmAjFfHiCmJiBeB_xHqqkZx_EnumGroup_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClN_xHqqkZx_
 *								 _xZkqqHx_iDeJiDhEiDfKiDgCiDgHjCgMiCpAiJmBiOfKiClFiClNjCgMiCkKiOhHjCoIiClDiCoKiCoJiBeC_xHqqkZx_
 *			pData				:EnumGroup_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClNiDgGiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	0 _xZkqqHx_iCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAiMhAjBlBiBeC_xHqqkZx_0_xZkqqHx_iImIiKePiCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAjCiGjCgGiBeC_xHqqkZx_
 *			_xZkqqHx_jFnEjCgMiCmN_xHqqkZx_EnumGroup_xZkqqHx_iKnGjAjEiCmMjFnEjCgMiCmGiCmIiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.15 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
typedef int (*FPEnumGroupProc)(	CFCMatrixControl* pControl,
								long lGroupIndex,
								BOOL bIsExpanded,
								long lItemIndexBegin,
								long lItemIndexEnd,
								long lVisibleLineBegin,
								long lVisibleLineEnd,
								const CRect& rtGroup,
								void* pData);

/*************************************************************************
 * <_xZkqqHx_iDfOiDeDiDhG_xHqqkZx_>	FPEnumGroupConstProc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	EnumGroupConst_xZkqqHx_iKnGjAjEiCmMiDfCiBfLiDiLiDgPiDgCiDeOiDhGiDiNiDfGiDfHiDiDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pControl			:CFCMatrixControl_xZkqqHx_iDeOiDiJiDfIiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lGroupIndex			:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDePiDiLiBfLiDhGiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsExpanded			:_xZkqqHx_iDePiDiLiBfLiDhGiCkKjDfHiKeKjCiGiCkJiCmHiCkEiCkJiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndexBegin		:_xZkqqHx_iDePiDiLiBfLiDhGiCmJjBkOiClHiCoJiNmFiPiJiCmMiDeBiDeDiDgFiDiAiCmMiDeDiDjDiDgGiDgCiDeOiDfI_xHqqkZx_
 *								 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndexEnd		:_xZkqqHx_iDePiDiLiBfLiDhGiCmJjBkOiClHiCoJiNmFiMoDiCmMiDeBiDeDiDgFiDiAiCmM_xHqqkZx_
 *								 _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiBhLiCfAiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lVisibleLineBegin	:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiNmFiPiJiCmMiNhDiCmMiBeBiJmCiOiLiDeBiDeDiDgFiDiA_xHqqkZx_
 *								 _xZkqqHx_iBgJjDfHiKeKjCiGiCmMiDePiDiLiBfLiDhGiBgKiCmMiCnNiCmFjBfDjBmMiCmFiCmM_xHqqkZx_
 *								 _xZkqqHx_iNhDiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lVisibleLineEnd		:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiNmFiMoDiCmMiNhDiBhLiCfAiCmMiBeBiJmCiOiLiDeBiDeDiDgFiDiA_xHqqkZx_
 *								 _xZkqqHx_iBgJjDfHiKeKjCiGiCmMiDePiDiLiBfLiDhGiBgKiCmMiCnNiCmFjBfDjBmMiCmFiCmM_xHqqkZx_
 *								 _xZkqqHx_iNhDiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			rtGroup				:_xZkqqHx_iClBiCmMiDePiDiLiBfLiDhGiCmMiLoJiMgAiNmAjFfHiCpAiOhHjCoIiBeCiDePiDiNiBfLiDgPiDiL_xHqqkZx_
 *								 _xZkqqHx_iNmAjFfHiCmJiBeB_xHqqkZx_EnumGroupConst_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClN_xHqqkZx_
 *								 _xZkqqHx_iDeJiDhEiDfKiDgCiDgHjCgMiCpAiJmBiOfKiClFiClNjCgMiCkKiOhHjCoIiClDiCoKiCoJiBeC_xHqqkZx_
 *			pData				:EnumGroupConst_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClNiDgGiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	0 _xZkqqHx_iCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAiMhAjBlBiBeC_xHqqkZx_0_xZkqqHx_iImIiKePiCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAjCiGjCgGiBeC_xHqqkZx_
 *			_xZkqqHx_jFnEjCgMiCmN_xHqqkZx_EnumGroupConst_xZkqqHx_iKnGjAjEiCmMjFnEjCgMiCmGiCmIiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.15 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
typedef int (*FPEnumGroupConstProc)(const CFCMatrixControl* pControl,
									long lGroupIndex,
									BOOL bIsExpanded,
									long lItemIndexBegin,
									long lItemIndexEnd,
									long lVisibleLineBegin,
									long lVisibleLineEnd,

									const CRect& rtGroup,
									void* pData);

/*************************************************************************
 * <_xZkqqHx_iDfOiDeDiDhG_xHqqkZx_>	FPEnumItemProc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	EnumItem_xZkqqHx_iKnGjAjEiCmMiDfCiBfLiDiLiDgPiDgCiDeOiDhGiDiNiDfGiDfHiDiDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pControl	:CFCMatrixControl_xZkqqHx_iDeOiDiJiDfIiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lGroupIndex	:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDeBiDeDiDgFiDiAiCkKjBkOiClHiCoJiDePiDiLiBfLiDhGiCmM_xHqqkZx_
 *						 _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndex	:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDeBiDeDiDgFiDiAiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *						 _xZkqqHx_jBmOiPnLiCkKiDePiDiLiBfLiDhGiDhHiDgCiDfPiCmMiPoKiNiHiCmN_xHqqkZx_ -1 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			rtItem		:_xZkqqHx_iClBiCmMiDeBiDeDiDgFiDiAiCmMiLoJiMgAiNmAjFfHiCpAiOhHjCoIiBeCiDePiDiNiBfLiDgPiDiL_xHqqkZx_
 *						 _xZkqqHx_iNmAjFfHiCmJiBeB_xHqqkZx_EnumItem_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClN_xHqqkZx_
 *						 _xZkqqHx_iDeJiDhEiDfKiDgCiDgHjCgMiCpAiJmBiOfKiClFiClNjCgMiCkKiOhHjCoIiClDiCoKiCoJiBeC_xHqqkZx_
 *			pData		:EnumItem_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClNiDgGiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	0 _xZkqqHx_iCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAiMhAjBlBiBeC_xHqqkZx_0_xZkqqHx_iImIiKePiCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAjCiGjCgGiBeC_xHqqkZx_
 *			_xZkqqHx_jFnEjCgMiCmN_xHqqkZx_EnumItem_xZkqqHx_iKnGjAjEiCmMjFnEjCgMiCmGiCmIiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.15 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
typedef int (*FPEnumItemProc)(	CFCMatrixControl* pControl,
								long lGroupIndex,
								long lItemIndex,
								const CRect& rtItem,
								void* pData);

/*************************************************************************
 * <_xZkqqHx_iDfOiDeDiDhG_xHqqkZx_>	FPEnumItemConstProc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	EnumItemConst_xZkqqHx_iKnGjAjEiCmMiDfCiBfLiDiLiDgPiDgCiDeOiDhGiDiNiDfGiDfHiDiDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pControl	:CFCMatrixControl_xZkqqHx_iDeOiDiJiDfIiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lGroupIndex	:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDeBiDeDiDgFiDiAiCkKjBkOiClHiCoJiDePiDiLiBfLiDhGiCmM_xHqqkZx_
 *						 _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lItemIndex	:_xZkqqHx_jHpBiLjDjBmOiPnLiCmMiDeBiDeDiDgFiDiAiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *						 _xZkqqHx_jBmOiPnLiCkKiDePiDiLiBfLiDhGiDhHiDgCiDfPiCmMiPoKiNiHiCmN_xHqqkZx_ -1 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			rtItem		:_xZkqqHx_iClBiCmMiDeBiDeDiDgFiDiAiCmMiLoJiMgAiNmAjFfHiCpAiOhHjCoIiBeCiDePiDiNiBfLiDgPiDiL_xHqqkZx_
 *						 _xZkqqHx_iNmAjFfHiCmJiBeB_xHqqkZx_EnumItemConst_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClN_xHqqkZx_
 *						 _xZkqqHx_iDeJiDhEiDfKiDgCiDgHjCgMiCpAiJmBiOfKiClFiClNjCgMiCkKiOhHjCoIiClDiCoKiCoJiBeC_xHqqkZx_
 *			pData		:EnumItemConst_xZkqqHx_iKnGjAjEiCmMiIpIjAjEiCmFiOhHjCoIiClDiCoKiClNiDgGiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	0 _xZkqqHx_iCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAiMhAjBlBiBeC_xHqqkZx_0_xZkqqHx_iImIiKePiCpAjFnEiClHiPoKiNiHiCmNjHpBiLjDiCpAjCiGjCgGiBeC_xHqqkZx_
 *			_xZkqqHx_jFnEjCgMiCmN_xHqqkZx_EnumItemConst_xZkqqHx_iKnGjAjEiCmMjFnEjCgMiCmGiCmIiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.15 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
typedef int (*FPEnumItemConstProc)(	const CFCMatrixControl* pControl,
									long lGroupIndex,
									long lItemIndex,
									const CRect& rtItem,
									void* pData);

	virtual int		EnumGroup (FPEnumGroupProc proc, long lOffsetY, void* pData);
	virtual int		EnumGroupConst (FPEnumGroupConstProc, long lOffsetY, void* pData) const;
	virtual int		EnumItem (	FPEnumItemProc proc,
								long lGroupTopY,
								long lGroupIndexBegin,
								long lGroupIndexEnd,
								void* pData);
	virtual int		EnumItemConst (	FPEnumItemConstProc proc,
									long lGroupTopY,
									long lGroupIndexBegin,
									long lGroupIndexEnd,
									void* pData) const;

// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual long	PointToGroupHeaderIndex (const CPoint& point) const;
// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual BOOL	PointToIndex (long& lGroupIndex, long& lItemIndex, const CPoint& point) const;
	virtual long	PointToIndex (const CPoint& point) const;

	enum FTIndexTo
	{
		REGAL_INDEX = 0,	// _xZkqqHx_jHeMiMpIiCmIiDeDiDjDiDgGiDgCiDeOiDfIjCgMiBeC_xHqqkZx_
		INTERVAL_INDEX,		// _xZkqqHx_iDePiDiLiBfLiDhGiKnEiMiEjFjEjFkKiCmMiDeDiDjDiDgGiDgCiDeOiDfIjCgMiBeC_xHqqkZx_
		OVER_INDEX,			// _xZkqqHx_iNmFiMoDiCmMiJmCiOiLiDePiDiLiBfLiDhGiCmMiNmFiMoDiCmMiDeBiDeDiDgFiDiAiCoGiCoIiJlKiCmMiDeDiDjDiDgGiDgCiDeOiDfIjCgMiBeC_xHqqkZx_
		HIDDEN_INDEX,		// _xZkqqHx_jFhDiJmCiOiLiDePiDiLiBfLiDhGiCmJjBkOiClHiCoJiDeDiDjDiDgGiDgCiDeOiDfIjCgMiBeC_xHqqkZx_
	};

	virtual FTIndexTo	IndexToVisibleLineColumn (long& lLine, long& lColumn, long lItemIndex) const;
	virtual FTIndexTo	VisibleLineColumnToIndex (long& lItemIndex, long lLine, long lColumn) const;
	virtual long	GetFirstVisibleItemIndex () const;
	virtual long	GetLastVisibleItemIndex () const;

//----- 06.11.09 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual long	GetFirstVisibleItemIndex (long lColumn) const;
//	virtual long	GetLastVisibleItemIndex (long lColumn) const;
//----- 06.11.09 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	virtual long	GetItemCount () const;
	virtual long	AddItem (DWORD dwData);
	virtual void	InsertItem (long lIndex, DWORD dwData);
	virtual void	DeleteItem (long lIndex);
	virtual void	DeleteAllItems ();
	virtual DWORD	GetItemData (long lIndex) const;
	virtual long	GetCurSel () const;
	virtual BOOL	SetCurSel (long lSel, BOOL bScroll = FALSE,
								BOOL bPostMessage = FALSE);
	virtual BOOL	SetSelect (long lIndexA, long lIndexB, BOOL bScroll = FALSE,
								BOOL bPostMessage = FALSE);

	virtual void	GetItemRect (CRect& rtItem, long lIndex) const;
	virtual long	GetTextHeight () const;
	virtual long	GetTotalTextHeight () const;
	virtual long	GetGroupHeaderHeight () const;
	virtual long	GetTotalGroupHeaderHeight () const;
	virtual long	GetItemWidth () const;
	virtual long	GetItemHeight () const;
//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual long	GetTotalItemWidth () const;
	virtual long	GetTotalItemHeight () const;
//----- 06.11.01 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
// 06.11.11 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	UpdateItemSize ();

// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	UpdateItemSize ();
	virtual void	UpdateScrollSize (BOOL bUpdateWindow);
	virtual long	ItemDataToIndex (DWORD dwData) const;

	virtual void	SetAllSelectionMark (BOOL bIsSet = TRUE);
	virtual BOOL	IsSelectionMark (long lIndex) const;
	virtual void	SetSelectionMark (long lIndex, BOOL bSet = TRUE);
// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	OffsetScroll (long lScroll);
	virtual void	OffsetScroll (long lScroll, BOOL bUpdateWindow = TRUE);
// 06.11.15 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual long	GetPixelOf1Scroll () const;

// 06.11.05 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual const wchar_t*	GetGroupName (DWORD dwGroupData) const;

	//----- _xZkqqHx_iDfEiDhFiDeOiDiJiDfIiCmFiDeDiDjDiDhGiDiKiDiBiDjDiDgHiCkKjFeLjHhGiCmIiKnGjAjE_xHqqkZx_ -----
	virtual const wchar_t*	GetName (DWORD dwData) const = 0;

protected:
	//----- _xZkqqHx_iDfEiDhFiDeOiDiJiDfIiCmFiDeDiDjDiDhGiDiKiDiBiDjDiDgHiCkKjFeLjHhGiCmIiKnGjAjE_xHqqkZx_ -----
	virtual void	DrawItem (long lIndex, DWORD dwData, CRect* rIndex, CDC* pDC) = 0;
// 06.11.11 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	ItemSize (long& lW, long& lH, long lFrW, long lFrH) const;
	virtual void	ItemSize (long& lW, long& lH) const;

	//----- _xZkqqHx_iDfEiDhFiDeOiDiJiDfIiCmFiDeDiDjDiDhGiDiKiDiBiDjDiDgHiCkKjFhDjHhGiCmIiKnGjAjE_xHqqkZx_ -----
// 06.11.15 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual BOOL	CalcIsBelongToReducedGroup (long lItemIndexBegin, long lItemIndexEnd) const;

// 06.11.11 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	CalcItemMatrix ();
	virtual BOOL	IsFrontOfRect (const CRect& rt, const CPoint& pt) const;
	virtual void	PostSelChangeMessage ();
	virtual void	PostLBtnDblClkMessage ();
	virtual long	GetIndexA () const;
	virtual long	GetIndexB () const;
	virtual BOOL	SetIndexAB (long lIndexA, long lIndexB, BOOL bScroll = FALSE,
								BOOL bPostMessage = TRUE);
	virtual BOOL	IsOnSelectedItem (const CPoint& ptMsc) const;
	virtual BOOL	IsCutMark (long lIndex) const;
	virtual void	SetCutMark (long lIndex, BOOL bSet = TRUE);
	virtual BOOL	IsRedrawMark (long lIndex) const;
	virtual void	SetRedrawMark (long lIndex, BOOL bSet = TRUE);
	virtual void	SendRgnRedraw ();

	//----- _xZkqqHx_iDeDiDhIiDjDiDgHjEkNjAlGiKnGjAjE_xHqqkZx_ -----
	virtual void	OnMsEvent (DWORD dwMessage, const CPoint& lgptMsc, UINT nFlags) = 0;
	virtual void	OnKyEvent (DWORD dwMessage, UINT nChar, UINT nFlags) = 0;
	virtual void	OnCmEvent (DWORD dwCommand) = 0;
	//----- _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiKnGjAjE_xHqqkZx_ -----
	virtual void	TimerEvent (DWORD dwIDEvent) = 0;

private:
	virtual WORD	GetItemState (long lIndex) const;
	virtual void	SetItemState (long lIndex, WORD wState);

//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	static int	OnPaintSubProc (CFCMatrixControl* pControl,
								long lGroupIndex,
								long lItemIndex,
								const CRect& rtItem,
								void* pData);
//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// _xZkqqHx_iDiGiBfLiDfFjFmPjAjEiBeC_xHqqkZx_
protected:
	static LPCTSTR	m_lpszClassName;	// AfxRegisterWndClass_xZkqqHx_iCmFjDgPjIfOiClDiCoKiClN_xHqqkZx_
										// _xZkqqHx_iDeOiDiJiDfIjGlMiCpAjFnLjBlGiBeC_xHqqkZx_

// 06.11.10 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	DWORD				m_dwMyStyle;	// _xZkqqHx_iMmFjHeMiDfIiDfOiDeDiDiLiBeC_xHqqkZx_

// 06.11.01 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	FDGroupDataVector	m_vGroup;		// _xZkqqHx_iDePiDiLiBfLiDhGiBeC_xHqqkZx_

//----- 06.11.08 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	map<DWORD, FCUniqIDAndExpanded>	m_mpGroupDataToExpandedRec;
										// _xZkqqHx_iDePiDiLiBfLiDhG_xHqqkZx_ID -> _xZkqqHx_jDfHiKeKiPoOjFpBiBeC_xHqqkZx_
//----- 06.11.08 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	FDItemDataVector	m_vItem;		// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiDgGiBfLiDfOiCmGiPpDjBnEiBeC_xHqqkZx_
	long		m_lIndexA;				// _xZkqqHx_jBeJjBpAiClDiCoKiClN_xHqqkZx_Item_xZkqqHx_iCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
	long		m_lIndexB;				// _xZkqqHx_jBeJjBpAiClDiCoKiClN_xHqqkZx_Item_xZkqqHx_iCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
	long		m_lColumnCount;			// _xZkqqHx_jAiFjFlNjFpLiMpMiCmMiDeBiDeDiDgFiDiAjAjEiBeC_xHqqkZx_
// 06.11.01 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	long		m_lItemLine;			// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiNhDjAjEiBeC_xHqqkZx_
	long		m_lItemW;				// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiJkBiDfEiDeDiDfJiBeC_xHqqkZx_
	long		m_lItemH;				// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiPgDiDfEiDeDiDfJiBeC_xHqqkZx_
	CWnd*		m_wndpMsgWnd;			// _xZkqqHx_iDiBiDgCiDfKiBfLiDfHiOpDiCkPiOoGiCoIjAoGiCmM_xHqqkZx_CWnd.
// 06.11.11 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	BOOL		m_bIs1StOnSize;			// _xZkqqHx_iNmFiPiJiCmMiDiKiDfEiDeDiDfJiCkJiBeI_xHqqkZx_
	DWORD		m_dwTimer;				// _xZkqqHx_iDfOiDeDiDhNiBfL_xHqqkZx_ID_xZkqqHx_iCpAjAnNjCoIiBeC_xHqqkZx_0_xZkqqHx_iCmIiCoHiDfOiDeDiDhNiBfLjCoCiOhOjCiGiBeC_xHqqkZx_

// 06.11.05 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	long		m_lTextHeight;			// _xZkqqHx_iDgFiDeMiDfIiDgHiNiCiBeC_xHqqkZx_

// _xZkqqHx_iDeBiDgHiDiKiDhCiDiFiBfLiDgH_xHqqkZx_
public:

// _xZkqqHx_iDeJiDhJiDiMiBfLiDfGiDiHiDjD_xHqqkZx_
public:

// _xZkqqHx_iDeJiBfLiDgPiBfLiDiJiDeDiDgI_xHqqkZx_
	// ClassWizard _xZkqqHx_iCmNiJlMjBhKiKnGjAjEiCmMiDeJiBfLiDgPiBfLiDiJiDeDiDgIiCpAjAlGjAkMiClFiCnMiClHiBeC_xHqqkZx_

	//{{AFX_VIRTUAL(CFCMatrixControl)
	//}}AFX_VIRTUAL

// _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_
public:
	virtual ~CFCMatrixControl();

	// _xZkqqHx_jAlGjAkMiClDiCoKiClNiDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDhNiDgCiDhGiKnGjAjE_xHqqkZx_
protected:
	//{{AFX_MSG(CFCMatrixControl)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPaint();
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg UINT OnGetDlgCode();
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	//}}AFX_MSG
	afx_msg void OnRbtnItemAny(UINT nCmdID);
	afx_msg LRESULT OnImeNotify(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
// 06.02.24 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
}; // class CFCMatrixControl.

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ _xZkqqHx_iCmNjBePiNhDiCmMjClMjBePiCmJjCmHiJmBiCmMjAoJiMlOiCpAjBhNjDpMiClFiCnMiClHiBeC_xHqqkZx_

#endif // !defined(AFX_MATRIXCONTROL_H__F5A5ADEE_7AD0_4338_B3C8_44D91260A1F8__INCLUDED_)
