Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Best way To Do?

Best way To Do?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pazzuzu
    wrote on last edited by
    #1

    Hi all, I have 3 dockable views in my application. In my Overrided "OnEraseBkgnd" message handler,Depending on some useractions sometimes,I have to redraw the background,some times not. BOOL C_View::OnEraseBkgnd(CDC* pDC) { if//something;;can be many useractions reqiring no redraw return FALSE; else// ;can be many useractions reqiring a redraw return CScrollView::OnEraseBkgnd(pDC); } what would be the best way,I could do that... Thanks...

    R 1 Reply Last reply
    0
    • P Pazzuzu

      Hi all, I have 3 dockable views in my application. In my Overrided "OnEraseBkgnd" message handler,Depending on some useractions sometimes,I have to redraw the background,some times not. BOOL C_View::OnEraseBkgnd(CDC* pDC) { if//something;;can be many useractions reqiring no redraw return FALSE; else// ;can be many useractions reqiring a redraw return CScrollView::OnEraseBkgnd(pDC); } what would be the best way,I could do that... Thanks...

      R Offline
      R Offline
      ryuki
      wrote on last edited by
      #2

      Make the background a view too. That helps allot, since windows keeps your backround image clean. If you realy need to redraw it you only need to call backview.invalidate();. You have to create a OnSize() Function that redraws the whole background in the view.

      P 1 Reply Last reply
      0
      • R ryuki

        Make the background a view too. That helps allot, since windows keeps your backround image clean. If you realy need to redraw it you only need to call backview.invalidate();. You have to create a OnSize() Function that redraws the whole background in the view.

        P Offline
        P Offline
        Pazzuzu
        wrote on last edited by
        #3

        Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups