Solved

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

Posted on 2001-08-02
6
275 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
Industry Leaders: 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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

756 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