Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Tooltips stopped working after migrating from VS 2005 to VS 2010

$
0
0

Hi,

My code in a C/C++ app to create and update tooltips stopped working between VS 2005 and VS 2010. The tooltip was created using:

hwndTT = CreateWindow(TOOLTIPS_CLASS, TEXT(""), WS_POPUP,CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, W_USEDEFAULT, NULL, (HMENU)NULL, hinstDrawbase, NULL);

This succeeds in VS 2005 and in VS 2010. If I then setup the tooltip structure and add the tooltip using:

SendMessage(hwndTT,TTM_ADDTOOL,0,(LPARAM)&ti);

This succeeds in VS 2005 and in VS 2010. If I then setup the tooltip structure to get the tooltip info using:

SendMessage( hwndTT, TTM_GETTOOLINFO, (WPARAM)0, (LPARAM)&ti );

This succeeds in VS 2005 but fails in VS 2010. The failure in VS 2010 gives last error as 0 (indicating S_OK) when using

dwError = GetLastError();

I have been using one tooltip window whose owner is a frame window whose child is an MDI window. This MDI window becomes the parent of multiple static text and edit control child windows. I was updating and activating/deactivating the tooltip window as the mouse moved over the static text and edit control child windows. I tried ignoring the error from the SendMessage to get tool info since last error says S_OK and tried sending messages to update the tool info and activate the tooltip anyway, but to no effect. So the "key" falure seems to be related to the TTM_GETTOOLINFO failure.

Can anyone help?

Thanks, Chris


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>