描述:
同样代码在我自己写的exe运行正常,但是改成BHO(一个ie状态栏的图标及其tooltip)就无法正常工作了,哪位帮帮忙!
// Create a ToolTip.
HWND hwndTT = CreateWindowEx(WS_EX_TOPMOST,
TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, g_hInst,NULL);
SetWindowPos(hwndTT, HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
// Set up "tool" information.
// In this case, the "tool" is the entire parent window.
TOOLINFO ti = { 0 };
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = 0;
ti.hwnd = hwndParent;
ti.hinst = NULL;
ti.uId = 123477;
ti.lpszText = TEXT("This is your ToolTip string.");;
GetClientRect (hwndParent, &ti.rect);
// Associate the ToolTip with the "tool" window.
if(!::SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti))
{
DWORD dwErr = ::GetLastError();
ASSERT(0);
return NULL;
}