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. Problem with cascaded controls

Problem with cascaded controls

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
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.
  • L Offline
    L Offline
    Lea Johnson
    wrote on last edited by
    #1

    I created a custom control derived from CWnd. I need to cascade many of these on a CFormView. I am able to create and cascade them but when I click on a portion of the top most control which is over another control, the control underneath receives the mouse input and not the top most one. I tried to disable the previous control but I need to receive WM_ messages for all the cascaded controls. I also tried this with a standard CButton class and the same problem occured. Does anyone know how to prevent this behaviour? Thanks in advance

    S 1 Reply Last reply
    0
    • L Lea Johnson

      I created a custom control derived from CWnd. I need to cascade many of these on a CFormView. I am able to create and cascade them but when I click on a portion of the top most control which is over another control, the control underneath receives the mouse input and not the top most one. I tried to disable the previous control but I need to receive WM_ messages for all the cascaded controls. I also tried this with a standard CButton class and the same problem occured. Does anyone know how to prevent this behaviour? Thanks in advance

      S Offline
      S Offline
      Sam Hobbs
      wrote on last edited by
      #2

      We do seem to have amazingly similar problems in spite of the applications being quite different. My application is for subitem editing of a list control, which also uses overlapped windows. So thank you for mentioning SetWindowPos. There are so many functions like it and the documentation does not make it clear that SetWindowPos would be useful in my situation. I think that something else I would have tried instead is BeginDeferWindowPos, EndDeferWindowPos and DeferWindowPos. I do not understand exactly what they do and how they work but they might be useful when the z-order of multiple windows needs to be specified. Are they not relevant to you situation?

      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