Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PretranslateMessage Not Getting Called

Status
Not open for further replies.

bitwise

Programmer
Mar 15, 2001
269
US
Why doesn't PreTranslateMessage(MSG* pMsg) get called from an ActiveX control when the ActiveX control is displayed in the webpage (IE)? I'm using PreTranslateMessage to display tooltips via:

BOOL CPsaSelectorCtrl::preTranslateMessage(MSG* pMsg)
{
//if the toop tip is valid
if(m_pToolTip)
m_pToolTip->RelayEvent(pMsg);
return COleControl::preTranslateMessage(pMsg);
}

Anyway, when I display the ActiveX control in the 'ActiveX Control Test Container' utility program PreTranslateMessage gets called and everything works. When I placed the ActiveX control on a webpage it DOESN'T get called and no tooltips are displayed! How could I fix this?

Thanks,
bitwise
 
I've been working on an analogous problem, and here's what I found:
His problem is even worded similarly to yours: "I noticed that my toolbar wasn't receiving ToolTip messages...This symptom is part of a similar illness—since the ActiveX control doesn't own the message loop, CWnd::preTranslateMessage is never called and the ToolTip messages don't get filtered properly. I'm not sure whether this is the most elegant solution, but I got around it by overriding the CToolBar::WindowProc function..."

Hope this helps.
 
The following will probably be a better solution. Maybe this is the only one that will work for you. It depends on your situation. I found an article that described a situation that's exactly like mine -- ActiveX control is a parent window of modeless dialog. The solution is to install a Windows WH_GETMESSAGE hook. Here's the article:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top