OnDraw not getting called
-
I have my CEditorView class, which is derived from CRichEditView. I put a breakpoint in my CEditorView::OnDraw function and it was never getting called. Why is OnDraw not getting called? Reason is, I want to be able to draw the line numbers and a margin, but I can't now that OnDraw is not getting called? Any help is appreciated!!
-
I have my CEditorView class, which is derived from CRichEditView. I put a breakpoint in my CEditorView::OnDraw function and it was never getting called. Why is OnDraw not getting called? Reason is, I want to be able to draw the line numbers and a margin, but I can't now that OnDraw is not getting called? Any help is appreciated!!
-
The definition for CEditorView::OnDraw is: virtual void OnDraw( CDC *pDC );
-
The definition for CEditorView::OnDraw is: virtual void OnDraw( CDC *pDC );
-
Sorry - had to ask:). I think problem is the following void CCtrlView::OnPaint() { // this is done to avoid CView::OnPaint Default(); } Default - is just a call to default winproc, instead of CView call to OnDraw(&dc);
OK, where is CCtrlView? Do I have to call Default to avoid this problem? I appreciate your responses, but I am a little confused about how to fix this with your current reply.
-
I have my CEditorView class, which is derived from CRichEditView. I put a breakpoint in my CEditorView::OnDraw function and it was never getting called. Why is OnDraw not getting called? Reason is, I want to be able to draw the line numbers and a margin, but I can't now that OnDraw is not getting called? Any help is appreciated!!
Looking at the class def for CRichEditView there is no virtual OnDraw() function. I've never used CRichEditView but I assume it is quite different to other CView derived classes. I suggest you have a look at some of the articles here on CP that use CRichEditView and see how they go about any drawing of there own. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com