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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WS_CLIPCHILDREN causing MORE flicker?!

WS_CLIPCHILDREN causing MORE flicker?!

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
2 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.
  • I Offline
    I Offline
    Intangir
    wrote on last edited by
    #1

    i have generally heard adding WS_CLIPCHILDREN to a parent window reduces flicker and i couldve sworn it has worked for me like that in the past but im writing an MFC application, it has a main frame tab control, and in the tabbable area i have a splitter with scrollable dialog views in it. weirdest thing is, if the mainframe has WS_CLIPCHILDREN the Tab control flickers like crazy on resizing (mostly grey while sizing) but without it it barely flickers at all (still flickers some) (also i changed the behavoir for OnSize to not make the splitter fill the whole frame area, cause i think this was causing flicker also because i would just immediately resize the splitter back into the tab controls display area) similarly i noticed that if my CSplitterWnds are created with WS_CLIPCLILDREN then whenever any part of the frame is resized ALL the child panes have TERRIBLE flickering but when i take WS_CLIPCHILDREN back off of the splitters i have very minimal flickering (just like on the main tab control) i dont understand why having WS_CLIPCHILDREN on Frames and Splitters would cause so much more terrible flicking for their child windows

    C 1 Reply Last reply
    0
    • I Intangir

      i have generally heard adding WS_CLIPCHILDREN to a parent window reduces flicker and i couldve sworn it has worked for me like that in the past but im writing an MFC application, it has a main frame tab control, and in the tabbable area i have a splitter with scrollable dialog views in it. weirdest thing is, if the mainframe has WS_CLIPCHILDREN the Tab control flickers like crazy on resizing (mostly grey while sizing) but without it it barely flickers at all (still flickers some) (also i changed the behavoir for OnSize to not make the splitter fill the whole frame area, cause i think this was causing flicker also because i would just immediately resize the splitter back into the tab controls display area) similarly i noticed that if my CSplitterWnds are created with WS_CLIPCLILDREN then whenever any part of the frame is resized ALL the child panes have TERRIBLE flickering but when i take WS_CLIPCHILDREN back off of the splitters i have very minimal flickering (just like on the main tab control) i dont understand why having WS_CLIPCHILDREN on Frames and Splitters would cause so much more terrible flicking for their child windows

      C Offline
      C Offline
      CWinThread
      wrote on last edited by
      #2

      When implementing my own non-dialog window class (e.g., something derived from CWnd), I typically add an OnEraseBkgnd() message handler, and change it to return TRUE (to indicate further erasing by the MFC framework is not needed). Sometimes, this helps me when trying to reduce flickering. In your case, I think one of the root causes of flickering may be the use of the MFC tab control. I usually try to avoid it myself in any resizing situation (e.g., look for a custom tab control implementation). I don't know how hard it would be for you but you could test if this is the case by creating the contents of one of your tabs/panes within a dummy parent dialog or CWnd class instead. Add the similar OnSize() logic and see if you can reduce flickering on resize now that the tab control is out of the picture.

      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