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