Drawing on top of a CHtmlview
-
I have the rather strange desire to draw a rectangle on top of a CHtmlview window in an MDI program. I naively thought that I could to this in OnPaint, but this would not seem to be the case. Is it possible to draw on top of this view type, and if so , how does one go about it?
-
I have the rather strange desire to draw a rectangle on top of a CHtmlview window in an MDI program. I naively thought that I could to this in OnPaint, but this would not seem to be the case. Is it possible to draw on top of this view type, and if so , how does one go about it?
One way would be to grab the screen shot of the view window in a CDC and CBitmap in ChildFrame/MainFrame. Then Hide the view in ChildFrame/MainFrame. Then display the grabbed screenshot in the client area of ChildFrame/MainFrame. Then you can display any graphic on top of it. Then on another event, you can show the view again. This is the dirty way. Another would be to create a floating modeless dialog box. Then using GDI, make it turn into a frame only with hollow center, like a rectangle. Then you can move the frame anywhere. There must be better ways to do it. Maybe someone else can help. this is this.