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. Cascading specific windows in a MFC MDI application

Cascading specific windows in a MFC MDI application

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

    A MDIParent Wnd has many MDIchild Wnds, and also few child dialogs. Dialogs are created this way --- CAutoDlg *pDlg = new CAutoDlg; pDlg->Create(IDD_AUTOCARD,this); I want to cascade only a specific type of dialogs, say dialogs of CAutoDlg type only. If i give MDICascade() it cascades all the child windows and dialogs under the MDIFrame. Is there any other un-conventional way other than calling SetWindowPos for each dialog, based on the position of the previous dialog?

    N 1 Reply Last reply
    0
    • E Elsie

      A MDIParent Wnd has many MDIchild Wnds, and also few child dialogs. Dialogs are created this way --- CAutoDlg *pDlg = new CAutoDlg; pDlg->Create(IDD_AUTOCARD,this); I want to cascade only a specific type of dialogs, say dialogs of CAutoDlg type only. If i give MDICascade() it cascades all the child windows and dialogs under the MDIFrame. Is there any other un-conventional way other than calling SetWindowPos for each dialog, based on the position of the previous dialog?

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      Elsie wrote:

      Is there any other un-conventional way other than calling SetWindowPos for each dialog

      Not that I know of, but it should be fairly simple to write your own cascading. Write a function that takes the type of window as parameter (typically CAutoDlg) and iterate over all your child frames/dialogs and position the ones inheriting from the supplied base type using IsKindOf().

      home

      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