Re: Drawing in CHtmlView



I am trying to create a software for collaborative browsing(two person
browsing together), so there will be a browser(which i m creating) on both
the sides and in that browser I want to display a mouse cursor which will
represent the other person's cursor, so this cursor is what I want to draw
somehow!
that cursor will also move according to the coordinates received from the
other person's browser.

"AliR (VC++ MVP)" wrote:

More or less yes. What is it exactly that you are trying to accomplish? Are
you loading a random page and then want to draw on it?

AliR.

"nexolite" <nexolite@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:10C7E1A3-6FB5-48AB-866B-DB1728BEDB8C@xxxxxxxxxxxxxxxx
Thanks Alir.
But please tell me more about how do it using the html?
I think I must get the HTML doument make changes to it(drawing) and then
put
it back?


"AliR (VC++ MVP)" wrote:

It is not going to be easy, if possible at all. If you want to draw


CHtmlView is a CFormView that has a browser window inside of it that
takes
up the entire area of the CFormView (m_wndBrowser).

All the drawing is done by and in that control. You will be fighting
with
control.

In order to draw something in that window you will have to replace that
control with your own so that you can catch its WM_PAINT message. This
means that you have to create your own CHTMLView class from scratch, and
instead of using CWnd as the base for m_wndBrowser, you can use CMyWnd
derived from CWnd which can catch the WM_PAINT message and do your own
drawing.
With all that said, I'm not sure if the browser control will simply paint
over what you have painted.

You might also be able to subclass the m_wndBrowser using SetWindowLong,
to
change it's default window proc.

AliR.


"nexolite" <nexolite@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:043133A4-385E-44D0-9BC0-5657B91ED744@xxxxxxxxxxxxxxxx
Please tell me how can I draw in a CHtmlView or how can I get the
device
context of CHtmlView?






.



Relevant Pages

  • Re: DataGridView: last column can be made smaller but not bigger
    ... column width change cursor. ... I have a DataGridView control where the user can resize the columns. ... When clicking on and dragging the ... edge of the window. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: DataGridView: last column can be made smaller but not bigger
    ... column width change cursor. ... I have a DataGridView control where the user can resize the columns. ... edge of the window. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Drawing in CHtmlView
    ... represent the other person's cursor, so this cursor is what I want to draw ... other person's browser. ... All the drawing is done by and in that control. ... In order to draw something in that window you will have to replace that ...
    (microsoft.public.vc.mfc)
  • Re: Webbrowser control looses sessionid on "newwindow"
    ... I do not have control over the web page. ... are errors then they are output to the window). ... instance of the webbrowser control), ... I haven't gone to the trouble of creating a beresque browser to test your ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Making window fit contents in all browsers?
    ... IE6, IE7, Firefox 2, and wherever else practicable, with the control ... labelled F.X0 fully visible at the top of the window and the control ... Again, what you say on the page itself is irrelevant as you have already resized the browser, without permission, before a person even has a change to read the page. ... Then it won't matter what toolbars/tabs or anything else is showing, you get the canvas area you are after. ...
    (comp.lang.javascript)