From: David Ching on
<pistonep(a)hotmail.com> wrote in message
news:1177096683.765916.234990(a)d57g2000hsg.googlegroups.com...
> The suggestion you make doesn t work in my so simple :( case. Perhaps
> are you right about TD covering TR but what stuns me is that I can
> found any reference on this problem on google ...
> someone ?

IMHO, CDHtmlDialog is like C++/CLI being a full-fledged .NET language ---
after developing it, Microsoft changed strategic direction and decided it
really didn't want to make it so easy. So CDHtmlDialog is very poorly
documented and has some pretty serious flaws. Things like if you have:

class CMyDHtmlBase : public CDHtmlDialog
{
// actually in the .cpp file, but you get the idea that this Base
class is handling events
BEGIN_DHTML_EVENT_MAP(CMyDHtmlBase)
DHTML_EVENT_TAG_ALL(DISPID_HTMLELEMENTEVENTS_ONMOUSEDOWN,
OnHtmlMouseDown)
END_DHTML_EVENT_MAP()
};

class CMyDHtmlDialog : public CMyDHtmlBase
{
// derived class
};



CMyDHtmlDialog dlg;
dlg.DoModal(); // show derived class



Guess what? CMyDHtmlBase::OnHtmlMouseDown() will never be called! That's
right, unhandled events don't get passed to the base class! As you can kind
of tell, since

BEGIN_DHTML_EVENT_MAP(CMyDHtmlBase)

does not specify the base class, unlike

BEGIN_MESSAGE_MAP(CColorStaticST, CStatic)



specifies the base class (CStatic) to enable the base class handling of
events. I was bit by this and spent several hours tracking it down, and of
course never found any MSDN or Google posts on the topic either. So now you
have to add event handlers that could be refactored into the Base class and
put them into the derived class so that they will be called. Ugh.

But the good news, is it works kind of well enough! :-)

In your case, just intercept events for all <TD> and in the handler, get the
<TR> that it's in, and you can implement the roll over on the row that way.

-- David