Task Panel Tooltips in ActiveX control |
Post Reply |
Author | |
KFournier
Groupie Joined: 17 August 2004 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 02 November 2004 at 3:46pm |
I'm writing an MFC ActiveX control in VC++ 6.0 which has a child task panel control. Tooltips do not appear for this control, and I was able to trace it down to the fact that (1) PreTranslateMessage doesn't fire for MFC ActiveX controls (at least is the application in which my controls are embedded) and (2) even if I get it to fire, AFX_MODULE_STATE's m_pfnFilterToolTipMessage is NULL. I also noticed the _XTP_ACTIVEX section of the CXTPTaskPanel::Create method for setting the AFX_MODULE_STATE's pfnFilterToolTipMessage to AxFilterToolTipMessage. Now, as far as I can tell, AxFilterToolTipMessage is not MFC. So, the question is: what's the best way to get this control's tooltips to appear? Should I try to force PreTranslateMessage to fire, or just call CWnd::FilterToolTipMessage directly somewhere? |
|
Kevin R. Fournier
SRP Computer Solutions, Inc. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
All right. PreTranslateMessage doesn't work with ActiveX. (MFC feature) you need: Override CXTPTaskPanel and add BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult) // Tooltips notification. return CWnd::OnWndMsg(message, wParam, lParam, pResult); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
KFournier
Groupie Joined: 17 August 2004 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Worked like a charm. Thank you.
|
|
Kevin R. Fournier
SRP Computer Solutions, Inc. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |