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. static background and WS_CLIPCHILDREN

static background and WS_CLIPCHILDREN

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
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.
  • C Offline
    C Offline
    Cyrus Dang
    wrote on last edited by
    #1

    Dear experts, Please show me how to redraw the background of static control (Group box) when its parent window has been set WS_CLIPCHILDREN style. Best regards.

    A 1 Reply Last reply
    0
    • C Cyrus Dang

      Dear experts, Please show me how to redraw the background of static control (Group box) when its parent window has been set WS_CLIPCHILDREN style. Best regards.

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      You would draw the static control like any other I would imagine. If I remember correctly WS_CLIPCHILDREN prevents the parent window from painting anything underneath any child windows, which prevents flicker with any controls. It's frustrating being a genius and living the life of a moron!!!

      C 1 Reply Last reply
      0
      • A alex barylski

        You would draw the static control like any other I would imagine. If I remember correctly WS_CLIPCHILDREN prevents the parent window from painting anything underneath any child windows, which prevents flicker with any controls. It's frustrating being a genius and living the life of a moron!!!

        C Offline
        C Offline
        Cyrus Dang
        wrote on last edited by
        #3

        Thanks for your response, When WS_CLIPCHILDREN is used, children windows have to do their painting themselves. Unfortunately, static controls, group box controls cannot draw their background. My temporary solution is setting the WS_EX_TRANSPARENT to these kinds of control (e.g. group box). Of course, they will flick, but the others can enjoy flicker-free. So, as what I said, I still used WS_CLIPCHILDREN to prevent flicker except static, group box controls. I'm still waiting for a complete solution. Thanks again.

        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