Solved

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

Posted on 2001-08-02
6
272 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
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:MichaelS
Comment Utility
Can you show your code where you fill ti?
0
 
LVL 9

Accepted Solution

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

ti.cbSize=sizeof(TOOLINFO);

0
 

Author Comment

by:jennyhou
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 9

Expert Comment

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

Expert Comment

by:MichaelS
Comment Utility
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
Comment Utility
> 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 125
ffmpeg - "rtsp://...... Operation not permitted" 4 68
modThree challenge 4 64
noX challenge 17 75
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now