I have a custom WTL control which is a panel with a list and a custom scroll bar.
class Panel
: public ATL::CWindowImpl<Panel>, public WTL::CDoubleBufferImpl<Panel> {
public:
DECLARE_WND_CLASS("Panel")
BEGIN_MSG_MAP_EX(Panel)
MSG_WM_CREATE(OnCreate)
MSG_WM_DESTROY(OnDestroy)
MSG_WM_SIZE(OnSize)
CHAIN_MSG_MAP(CDoubleBufferImpl<Panel>)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
The scroll bar is created by the panel in OnCreate():
m_scrollBar.Create(m_hWnd, WTL::CRect(...));
That scroll bar works fine in many other dialog windows. However, inside that panel control the scroll bar appears, but receives no mouse events at all. If I add WM_MOUSEMOVE
handler to the panel, it does get called.
What could be the problem?