Not getting ToolTip for check boxes & Buttons

Not getting ToolTip for check boxes & Buttons

I am facing issue with tooltip. I have one module where i am creating controls & giving string for tooltip. From two separate modules i am using these controls. But only from one module i am getting tooltip. In other flow i am not getting. Actually these are xtp controls created on XTPToolbar. In CXTPToolBar, OnToolHitTest function is there. This is not getting called in one flow, where tooltip is not coming up. Any suggestions why this is happening??

virtual int CWnd::OnToolHitTest(CPoint point, TOOLINFO* pTI) const;

Return Value

If 1, the tooltip control was found; If -1, the tooltip control was not found.


Therefore, we need CWnd::PreTranslateMessage to translate window messages and help CToolTipCtrl to show tip.

CToolTipCtrl  : Encapsulates the functionality of a "tool tip control," a small pop-up window that displays a single line of text describing the purpose of a tool in an application.

Please check the following msdn article: http-://msdn.microsoft.-com/en-us/library/6b4cb3a5(v=VS.80).aspx

Code snippets:

virtual BOOL PreTranslateMessage( MSG* pMsg  );

Please check your code again. If you still have any questions about this issue, please let me know

  • Back aarticle:
  • Next aarticle: No
  • Copyright © 2007-2012 www.chuibin.com Chuibin Copyright