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. ID of a child dialog

ID of a child dialog

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helplearning
2 Posts 1 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.
  • A Offline
    A Offline
    Antti Keskinen
    wrote on last edited by
    #1

    Hi ! I have a small MFC SDI application, with "App -> Frame Window -> Form View" structure. Now, Form View has a member - a modeless dialog object. When the form view is created, it creates the modeless dialog, use it's controls, get stuff from there and so on.. Everything works fine.. But then, the PROBLEM :) How can I access this very same modeless dialog from the Frame Window's level ? The modeless dialog is a child window of the Frame Window, but I have no clue about it's ID, which would be needed for CWnd::GetDescendant. I used the CDialog::Create with a resource ID to construct the dialog in the first place. So couldn't specify an ID there either.. Any clues on finding it ? Greets, Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

    A 1 Reply Last reply
    0
    • A Antti Keskinen

      Hi ! I have a small MFC SDI application, with "App -> Frame Window -> Form View" structure. Now, Form View has a member - a modeless dialog object. When the form view is created, it creates the modeless dialog, use it's controls, get stuff from there and so on.. Everything works fine.. But then, the PROBLEM :) How can I access this very same modeless dialog from the Frame Window's level ? The modeless dialog is a child window of the Frame Window, but I have no clue about it's ID, which would be needed for CWnd::GetDescendant. I used the CDialog::Create with a resource ID to construct the dialog in the first place. So couldn't specify an ID there either.. Any clues on finding it ? Greets, Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

      A Offline
      A Offline
      Antti Keskinen
      wrote on last edited by
      #2

      Note to self: "Experiment more before asking" FindWindow was the answer. Although it's a bit "odd" way of doing it, it works. Accompanied with a test to 'IsChild', and sure match is made. -Antti ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

      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