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. clipping child windows

clipping child windows

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.
  • N Offline
    N Offline
    nt23
    wrote on last edited by
    #1

    Hi All. I have a window which has child windows of two types. The child windows can be of non-rectangle shape. I need to exclude from painting the areas occupied by windows of the first type but not the second ones. If I create the window with the WS_CLIPCHILDREN option, I'll get the both types of child windows excluded. What might be the best way to implement this using VC++ and MFC? I've looked towards regions but at the moment it looks a little bit difficult comparing with just specifying one option. Thanks.

    J 1 Reply Last reply
    0
    • N nt23

      Hi All. I have a window which has child windows of two types. The child windows can be of non-rectangle shape. I need to exclude from painting the areas occupied by windows of the first type but not the second ones. If I create the window with the WS_CLIPCHILDREN option, I'll get the both types of child windows excluded. What might be the best way to implement this using VC++ and MFC? I've looked towards regions but at the moment it looks a little bit difficult comparing with just specifying one option. Thanks.

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2
      1. WS_CLIPCHILDREN appies mainly to OnEraseBkgnd(), so override it to return success. 2) Do all your drawing in OnPaint() or OnDraw(). 3) Draw what you need and then exclude there regions or rects. 4) Draw background. Beyond that, your question does not make much since. INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen
      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