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