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. To get all windows thru all open documents in MDI application in MFC

To get all windows thru all open documents in MDI application in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helptutorial
3 Posts 3 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.
  • S Offline
    S Offline
    SanjaySMK
    wrote on last edited by
    #1

    Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre

    _ P 2 Replies Last reply
    0
    • S SanjaySMK

      Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      One way could be to use the FindWindow() function I haven't tried it myself but if you get success doing the same please intimate me Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar

      1 Reply Last reply
      0
      • S SanjaySMK

        Hello, I have an MDI application in MFC, wherein I am opening several documents, my question is how to get all the child frame windows thru the document pointer? I am using functions GetFirstDocTemplatePosition and GetNextDocTemplate. But thru those how can I get all the child frame windows. Please help. Software Developer Sanjay Khapre

        P Offline
        P Offline
        prasad_som
        wrote on last edited by
        #3

        Have you tried CWnd::GetNextWindow. MSDN description of function says "Searches for the next (or previous) window in the window manager’s list. The window manager’s list contains entries for all top-level windows, their associated child windows, and the child windows of any child windows. If CWnd is a top-level window, the function searches for the next (or previous) top-level window; if CWnd is a child window, the function searches for the next (or previous) child window." Use this function on main frame window . In document class you can get main window by using function AfxGetMainWnd

        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