?
Solved

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

Posted on 2001-08-02
6
Medium Priority
?
278 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 800 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 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