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. Document order

Document order

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studioquestion
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.
  • V Offline
    V Offline
    vineas
    wrote on last edited by
    #1

    In an MFC MDI app, I need to determine the ordering of open documents, based on the z-order of the associated views. I tried using GetFirstDocPosition() and it's associates, but it turns out that only gives me the order in which the documents were opened (which is the same as the order typically displayed in the "Window" menu). What I need though is the order in which the documents are in the z-order (like if you cycle through them with CTRL-TAB). I know this is possible, the VC.NET 2003 IDE shows the "Window" menu in this order, I just can't figure out how it's done. :confused: Any ideas or directions I can look? ----- In the land of the blind, the one eyed man is king.

    N 1 Reply Last reply
    0
    • V vineas

      In an MFC MDI app, I need to determine the ordering of open documents, based on the z-order of the associated views. I tried using GetFirstDocPosition() and it's associates, but it turns out that only gives me the order in which the documents were opened (which is the same as the order typically displayed in the "Window" menu). What I need though is the order in which the documents are in the z-order (like if you cycle through them with CTRL-TAB). I know this is possible, the VC.NET 2003 IDE shows the "Window" menu in this order, I just can't figure out how it's done. :confused: Any ideas or directions I can look? ----- In the land of the blind, the one eyed man is king.

      N Offline
      N Offline
      Neville Franks
      wrote on last edited by
      #2

      You'll need to enumerate the MDI child windows. Have a look at GetWindow( GW_HWNDFIRST / GW_HWNDNEXT ) and GetNextWindow() and also EnumChildWindows (). Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

      V 1 Reply Last reply
      0
      • N Neville Franks

        You'll need to enumerate the MDI child windows. Have a look at GetWindow( GW_HWNDFIRST / GW_HWNDNEXT ) and GetNextWindow() and also EnumChildWindows (). Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"

        V Offline
        V Offline
        vineas
        wrote on last edited by
        #3

        That looks like exactly what I was looking for. Thanks a bunch! ----- In the land of the blind, the one eyed man is king.

        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