CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Device Context

  1. #1
    Join Date
    Oct 1999
    Posts
    16

    Device Context

    In MFC: In my application, the printed work is completely different than what my users will see on their monitors. Thus, I want to erase everything done by my OnDraw() function before the document gets printed. How would I erase it? Is there a member function that does this? Or do I have to do it the hard way...

    &d http://www.angelfire.com/ct/aznandy

  2. #2
    Join Date
    Oct 1999
    Location
    Germany
    Posts
    238

    Re: Device Context

    Hi !

    you could directly call CWnd::OnErasebkgng(CDC* pDC).
    Before you do this you will have to call CWnd::Invalidate(TRUE)
    to mark the entire clientarea as invalid.

    Hope this helps,

    Matthias.


    I had a thought,
    You know, I thought it a lot,
    I thought I was smart,
    Now I know that I'm not

    - The Presidents Of The United States Of America

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured