The double click events are emulated in the beginning of the CExtGridBaseWnd::OnLButtonDown()
method. We modified beginning of this method and added mouse position checking code to fix the tree row expanding issue:
void CExtGridBaseWnd::OnLButtonDown(UINT nFlags, CPoint point)
{
ASSERT_VALID( this );
if( m_eMTT != __EMTT_NOTHING )
{
SendMessage( WM_CANCELMODE );
if( m_eMTT != __EMTT_NOTHING )
return;
} // if( m_eMTT != __EMTT_NOTHING )
UINT nRepCnt = 1;
static clock_t g_nLastClock = 0;
static HWND g_hWndLastClick = NULL;
static CPoint g_ptLastClick(-32767,-32767);
CPoint ptLastClick = point;
ClientToScreen( &ptLastClick );
clock_t nCurrClock = ::clock();
if( g_hWndLastClick == m_hWnd
&& g_ptLastClick == ptLastClick
)
{
clock_t nDiff = (clock_t)::abs( nCurrClock - g_nLastClock );
clock_t nDoubleClickTime = (clock_t)::GetDoubleClickTime();
if( nDiff <= nDoubleClickTime )
nRepCnt = 2;
}
g_ptLastClick = ptLastClick;
g_hWndLastClick = m_hWnd;
g_nLastClock = nCurrClock;
HWND hWndOwn = m_hWnd, hWndFocus = ::GetFocus();
if( ( hWndFocus != m_hWnd ) && ( m_nMouseActivateCode == MA_ACTIVATE || m_nMouseActivateCode == MA_ACTIVATEANDEAT ) )
{ // check MDI child frame activation explicitly
bool bIsMDIChildWindow = false;
. . .
We have checked the source code of the
CExtGridCellFont::Serialize()
method. It’s exactly the same in Prof-UIS 2.82 and 2.84. The problem is outside the
CExtGridCellFont
class. The
CExtGridCellFont
class class is based on the
CExtGridCellEx
class. The
CExtGCF < CExtGCC < CExtGridCell > >
class is derived from the
CExtGridCellEx
class in Prof-UIS 2.82. It’s derived from the
CExtGCJ < CExtGCF < CExtGCC < CExtGridCell > > >
class in Prof-UIS 2.84. The new
CExtGCJ
template decorator class adds the cell join feature support to grid cell objects. The
CExtGCJ::Serialize()
virtual method invokes the
CExtGCJ::SerializeJoin()
for serialization of joined cell region information. The
CExtGCJ::Serialize()
method adds new information into serialized stream in Prof-UIS 2.84. This information is not waited by Prof-UIS 2.82. So, we confirm this is the version dependent compatibility issue. If you strongly need to keep 2.82 format compatibility, then you can implement the
CExtGCJ::SerializeJoin()
virtual method with empty body in your
CExtGridCellFont
-derived class.