473,500 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDHtmlDialog::OnLButtonDown

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
Nov 16 '05 #1
1 3513
Don
Sorry, disregard. I got it.

-----Original Message-----
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
.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.