CMFCToolTipCtrl doen't enter OnPaint when I use it in my self-draw CTreeCtrl

Ji Shirley 181 Reputation points

Non-modal ActiveX Control, a self-draw CMyTreeCtrl is shown on it.
Now, I create a CMFCToolTipCtrl in my CMyTreeCtrl and I want to dynamically change the text color of Tooltip.
I use SetParams in the ToolTip callback function and set new color/text . However, I can't get new color when the tooltip displayed. After I debug and found that it can't enter CMFCToolTipCtrl onpaint.
I add RelayEvent in PreTranslateMessage function.
If I use invalidate, then the whole ActiveX Control will flash rapidly.
I inherited CMFCToolTipCtrl and found that WM_PAINT cannot be received in PreTranslateMessage.
It can only receive WM_TIMER.

Could you help me find the reasion? Thanks a lot.

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,593 questions
{count} votes