Print Page | Close Window

Task Panel Tooltips in ActiveX control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1361
Printed Date: 13 July 2025 at 6:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Task Panel Tooltips in ActiveX control
Posted By: KFournier
Subject: Task Panel Tooltips in ActiveX control
Date 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.



Replies:
Posted By: Oleg
Date Posted: 03 November 2004 at 3:41am

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)
 {
  MSG msg;
  msg.wParam = wParam;
  msg.lParam = lParam;
  msg.message = message;
  msg.hwnd = m_hWnd;
  GetCursorPos(&msg.pt);

  // Tooltips notification.
  FilterToolTipMessage(&msg);

  return CWnd::OnWndMsg(message, wParam, lParam, pResult);
 } 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: KFournier
Date Posted: 03 November 2004 at 10:51am
Worked like a charm. Thank you.

-------------
Kevin R. Fournier
SRP Computer Solutions, Inc.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net