Solved

Button's tool tip can't show on WinXP platform.

Posted on 2001-08-02
6
277 Views
Last Modified: 2013-11-20
Hi! I have a question about tooltips. I wrote a program running on WinXP platform. I try to make my program look like "Windows XP Visual Styles", so I use a XML format file to invoke ComCtl32.dll version 6 to make it work. As a result, my program DOES look like Windows XP Visual Styles, but the tooltips on all buttons are gone... I find that it fails when I use "SendMessage(TTM_GETCURRENTTOOL, 0, (LPARAM)&ti))" (Note. ti is TOOLINFO data type). I got a NULL value for ti data structure. Anybody knows what is happening? Please help me out... Thanks in advanced.    


Best Regards,

Jenny

p.s. the tooltips running on Win2000 is working properly.
0
Comment
Question by:jennyhou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 6344324
Can you show your code where you fill ti?
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 200 total points
ID: 6344456
have you set the cbSize member of you TOOLINFO structure?

ti.cbSize=sizeof(TOOLINFO);

0
 

Author Comment

by:jennyhou
ID: 6347261
Hello! ShaunWilde,

Thanks for your tips. you remind me to focus on TOOLINFO "SIZE" issue. one of my friends wrote a piece of codes(a class which is derived from CToolTipCtrl) to deal with tooltips for me. That's the codes my friend wrote long time ago... I do not know why he used a user-defined structure just like TOOLINFO, but size is a little bit different. So That's why I got a NULL value for ti data structure except ti.cbSize.(I got incorrect ti.cbSize value) Thanks a lot!


Jenny  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6347669
glad to help - a pitfall I usually do myself at least once a month
0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6347754
Than it sounds strange that it worked under other OS.

>p.s. the tooltips running on Win2000 is working properly
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6347802
> Than it sounds strange that it worked under other OS.

may be maybe not - other OSs may not check the value as they will only fill in the minimum structure however later OS builds may have more to add to the structure so they will check the size value to know whether it is safe to do so - not an uncommon practice - just annoying as it makes you get away with bad code that works on one OS and doesn't on another

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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