Anybody knows how to trap LButtonDown on htmlviewer control ?
there's no red circle around when i tap and hold the control. i need this to
show the popup menu.
I'm using evc 4.0
I wondering what if i add the WM_COMMAND.... but the control doesnt have an
ID

this is my code to create the htmlviewer :

// SET MENU HTML VIEWER
HINSTANCE hInstResource = NULL;
hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(IDR_POPUP_READONLY),
RT_MENU);
m_hMenuHtmlView = ::LoadMenu(hInstResource,
MAKEINTRESOURCE(IDR_POPUP_READONLY));

// HTML VIEWER
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER;
RECT rect;
m_edtPesanReadOnly.GetWindowRect(&rect);
m_hwndHtml = CreateWindow (DISPLAYCLASS,
NULL,
dwStyle,
rect.left,
rect.top,
rect.right,
rect.bottom,
m_hWnd,
m_hMenuHtmlView,
m_HtmlViewInstance,
NULL);

Thanks

Riki Risnandar

Re: OnLButtonDown on htmlviewer by Riki

Riki
Wed Jan 26 06:32:19 CST 2005

well i found the answer, just sharing the info.
to enable the context menu in htmlview just send the window message to the
htmlviewer

::SendMessage(m_hwndHtml, DTM_ENABLECONTEXTMENU, 0, (LPARAM) VARIANT_TRUE);

but i still find a way to change the menu to my custom context menu.
Any help would be appreciated.

Riki Risnandar

"Riki Risnandar" <ris_nandar@yahoo.com> wrote in message
news:utqtDyjAFHA.3940@TK2MSFTNGP09.phx.gbl...
> Anybody knows how to trap LButtonDown on htmlviewer control ?
> there's no red circle around when i tap and hold the control. i need this
> to show the popup menu.
> I'm using evc 4.0
> I wondering what if i add the WM_COMMAND.... but the control doesnt have
> an ID
>
> this is my code to create the htmlviewer :
>
> // SET MENU HTML VIEWER
> HINSTANCE hInstResource = NULL;
> hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(IDR_POPUP_READONLY),
> RT_MENU);
> m_hMenuHtmlView = ::LoadMenu(hInstResource,
> MAKEINTRESOURCE(IDR_POPUP_READONLY));
>
> // HTML VIEWER
> DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER;
> RECT rect;
> m_edtPesanReadOnly.GetWindowRect(&rect);
> m_hwndHtml = CreateWindow (DISPLAYCLASS,
> NULL,
> dwStyle,
> rect.left,
> rect.top,
> rect.right,
> rect.bottom,
> m_hWnd,
> m_hMenuHtmlView,
> m_HtmlViewInstance,
> NULL);
>
> Thanks
>
> Riki Risnandar
>