Solved

ToolTips in a CWND?

Posted on 1997-11-18
4
517 Views
Last Modified: 2013-11-20
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
Comment
Question by:apollyon111897
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1310226
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
 

Author Comment

by:apollyon111897
ID: 1310227
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
 
LVL 7

Expert Comment

by:galkin
ID: 1310228
Implement message handler for TTN_NEEDTEXTA and TTN_NEEDTEXTW. You can copy code from CFrameWnd class. Add corresponding string to string table.
0
 

Author Comment

by:apollyon111897
ID: 1310229
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question