Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Tooltips with CXTPToolBar in ActiveX Ctrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltips with CXTPToolBar in ActiveX Ctrl

 Post Reply Post Reply
Author
Message
lallard View Drop Down
Newbie
Newbie
Avatar

Joined: 23 November 2004
Location: Canada
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lallard Quote  Post ReplyReply Direct Link To This Post Topic: Tooltips with CXTPToolBar in ActiveX Ctrl
    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.
Back to Top
kturner View Drop Down
Newbie
Newbie
Avatar

Joined: 14 January 2005
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kturner Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.061 seconds.