CDHtmlDialog::OnLButtonDown

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I'm trying to capture the left-mouse button down event in
a CDHtmlDialog window (the body of the HTML document).
I'm trying this but nothing's happening:

HRESULT OnHtmlMouseDown(IHTMLElement *pElement);
DECLARE_DHTML_EVENT_MAP()

BEGIN_DHTML_EVENT_MAP(CMyApp)
DHTML_EVENT_ONMOUSEDOWN(_T("body"),OnHtmlMouseDown)
END_DHTML_EVENT_MAP()

HRESULT CMyApp::OnHtmlMouseDown(IHTMLElement* /*pElement*/)
{
MessageBox("OnHtmlMouseDown",NULL,MB_OK);
return S_OK;
}

Basically, I'm just trying to make the dialog window
draggable, but CDHtmlDialog doesn't pick up the
WM_LBUTTONDOWN event like CDialog does, or am I missing
something?

Thanks in advance!
Cheers,
Don
 
Back
Top