The following timer IDs exist in afxdockablepane.h
// auto hide timer events
static const UINT AFX_AUTO_HIDE_SLIDE_IN_EVENT = 1;
static const UINT AFX_AUTO_HIDE_SLIDE_OUT_EVENT = 2;
static const UINT AFX_ID_CHECK_AUTO_HIDE_CONDITION = 3;
These IDs can simply conflict with existing timer IDs.
I would have expect MFC timer to be in a sort of preserved ID range as is the case for almost any MFC specific IDs.
Of course the workaround is simple: just use other timer IDs to avoid any conflict, but these issues or precautions are not listed anywhere in the MFC documentation