I think there is an error if atlsplit.h ( WTL90_4140-613 ) that behaves as follows:
I think the bug is in SetSplitterPos(). The m_xySplitterPos is changed, but m_xySplitterPosNew is left unchanged. When a WM_CAPTURECHANGED is received (for some unknown reason) OnCaptureChanged() thinks a move is going on.
By changing the SetSplitterPos(), line 168, from m_xySplitterPos = xyPos; to m_xySplitterPosNew = m_xySplitterPos = xyPos; the error disappears.
I have not been able to reproduce the error in a simple test application because I do not receive the WM_CAPTURECHANGED event there. My app contains multiple nested splitters and panes with list view controls, browser control e.t - too complicate to reproduce in a test app. I do not know why the WM_CAPTURECHANGED is fired when the menu closes in my app.
What you must consider is: Does it create side effects if the m_xySplitterPosNew is set equal to m_xySplitterPos in SetSplitterPos()?
From code m_xySplitterPosNew has the comment “internal - new position while moving”. So it’s only used while dragging the splitter bar (?).
Anyway, I have not experienced any abnormal behavior after changing the code as indicated.
Thanks for WTL
Ottar Arne
Anonymous
This is a duplicate of the bug #272
Fixed in atlsplit.h, rev 621