Print Page | Close Window

Tooltips with CXTPToolBar in ActiveX Ctrl

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=1655
Printed Date: 07 November 2025 at 4:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltips with CXTPToolBar in ActiveX Ctrl
Posted By: lallard
Subject: Tooltips with CXTPToolBar in ActiveX Ctrl
Date Posted: 11 January 2005 at 7:42am

Tooltips don't work in a CXTPToolBar in an ActiveX Control.  I asked support for advice and couldn't get an answer.  Well, I managed to make it work.  So if this can help, here is how I solved my problem: 

I created a subclass of CXTPToolBar where I declared an override of OnMouseMove and RelayEvent.

void clToolBarInControl::OnMouseMove(UINT nFlags, CPoint point)

{

   RelayEvent(WM_MOUSEMOVE, (WPARAM)nFlags,

                 MAKELPARAM(LOWORD(point.x), LOWORD(point.y)));

   CXTPToolBar::OnMouseMove(nFlags, point);

}

void clToolBarInControl::RelayEvent(UINT message, WPARAM wParam, LPARAM

lParam)

{

   MSG msg;

   msg.hwnd= m_hWnd;

   msg.message= message;

   msg.wParam= wParam;

   msg.lParam= lParam;

   msg.time= 0;

   CPoint point;

   point.x = LOWORD (lParam);

   point.y = HIWORD (lParam);

   // FilterToolTipMessage calls ScreenToClient on the Point so we need

  // to make sure the Point coordinates are in Client coordinates.

   ::ClientToScreen( m_hWnd, &point );

   msg.pt = point;

   FilterToolTipMessage(&msg);

}

 

I hope this can help someone with the same problem.

Cheers!

Linda



-------------
Bear with me. I'm new at this.



Replies:
Posted By: kturner
Date Posted: 24 January 2005 at 8:33pm
Thank you!
Thank you!
Thank you!
... it's so beautiful, makes me want to cry. I finally have tooltips.
Seriously, kudos.



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