Solved

ToolTips in a CWND?

Posted on 1997-11-18
4
518 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro to save highlighted rows as a separate file 5 45
zeroFront challenge 7 111
Problem to open Excel file 15 170
Problem to App source 6 69
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.

792 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