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. MDIChildWnd flicker !!!

MDIChildWnd flicker !!!

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphics
4 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.
  • _ Offline
    _ Offline
    _skidrow_vn_
    wrote on last edited by
    #1

    I set background bitmap for my MDIChildWnd >>> okay void CTest2View::OnPaint() // MDIChildWnd { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here // My code to paint background.....draw to dc } but When I resize MDIChildWnd, it 's flicker I can not fix it help me

    J 1 Reply Last reply
    0
    • _ _skidrow_vn_

      I set background bitmap for my MDIChildWnd >>> okay void CTest2View::OnPaint() // MDIChildWnd { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here // My code to paint background.....draw to dc } but When I resize MDIChildWnd, it 's flicker I can not fix it help me

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      Normaly you would draw the background image in OnEraseBkgnd() which might solve part of your problem. Alternatly you can over ride OnEraseBkgnd(), so that it does not erase the background before OnPaint() is called, and do all the drawing in OnPaint(). There are some articles at codeproject on this subject and it is probably addressed in the FAQs. INTP

      _ 1 Reply Last reply
      0
      • J John R Shaw

        Normaly you would draw the background image in OnEraseBkgnd() which might solve part of your problem. Alternatly you can over ride OnEraseBkgnd(), so that it does not erase the background before OnPaint() is called, and do all the drawing in OnPaint(). There are some articles at codeproject on this subject and it is probably addressed in the FAQs. INTP

        _ Offline
        _ Offline
        _skidrow_vn_
        wrote on last edited by
        #3

        Could you show me more detail about this ? You mean: I do paint in CMDIChildWnd based class or CFormView based class of MDIChildWnd ?? in class which derive from CFormView have no WM_ERASEBKGND message ?! I also do paint in both but not result, when resize it still flicker. help me.......thanks:rose:

        J 1 Reply Last reply
        0
        • _ _skidrow_vn_

          Could you show me more detail about this ? You mean: I do paint in CMDIChildWnd based class or CFormView based class of MDIChildWnd ?? in class which derive from CFormView have no WM_ERASEBKGND message ?! I also do paint in both but not result, when resize it still flicker. help me.......thanks:rose:

          J Offline
          J Offline
          John R Shaw
          wrote on last edited by
          #4
          1. Search for articals on flicker free drawing (at codeproject). Example: "Do a flicker-free drawing using MFC methods" 2) SDI, MDI, and Form windows are all directly or indirectly derived from CWnd which does receive a WM_ERASEBKGND message: Example: CWnd->CView->CScrollView->CFOrmView. Good luck! INTP
          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