[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

ToolTips in a CWND?

I'm currently sending a SendMessage command
to the tooltip object I get from _AFX_THREAD_STATE
with a ti structure that points to a child window.
The SendMessage returns TRUE for TTM_ADDTOOL, but
I never get a TTN_NEEDTEXT message for anything
but the main window.
I am setting the lpszText field to LPSTR_TEXTCALLBACK;

(The main example I'm going off of is on page 623
of Charles Petzold's "Programming Windows 95."

Help,
 Mike Eegz
 eganm@segasoft.com
0
apollyon111897
Asked:
apollyon111897
  • 2
  • 2
1 Solution
 
galkinCommented:
TTN_NEEDTEXT is ent to the tooltip owner window. If you work with a toolbar this message(actually TTN_NEEDTEXTA for ANSI and TTN_NEEDTEXTW for UNICODE) is sent to toolbar parent window
0
 
apollyon111897Author Commented:
2 clarifications:

What's an ent?

I'm not using a toolbar.  That would make the problem trivial.
My problem is that I've got a CWND with a bunch of buttons, lists, etc. in it.  I want to upgrade it by adding tooltips.

Thanks
0
 
galkinCommented:
Implement message handler for TTN_NEEDTEXTA and TTN_NEEDTEXTW. You can copy code from CFrameWnd class. Add corresponding string to string table.
0
 
apollyon111897Author Commented:
I'm not getting any NEEDTEXT messages when I leave my mouse
over any of the window's children.
Only the Window is giving a NEEDTEXT callback.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now