Can not Access The Newly Created Form on the Main window.

Hi all ,

In My MFC Application I am creating the window with Some controls.

What I have done.

1 ) inserted the IDD_FORMVIEW resource
2) from Class Wiszard Created new class for the above Resource (base Class is CDialog )

3) on Menu commnad I am Creating window as follows

void CMainFrame::OnMastersGroupmaster() // For Menu command
{
// TODO: Add your command handler code here

groupdlg = new CGroupMaster(); /// prointer for the my Dialog Class

groupdlg->Create (IDD_FORMVIEW_mastGROUP,this);
ASSERT(groupdlg);
groupdlg->ShowWindow (SW_SHOW);
groupdlg->CenterWindow ();

}

now problem is when window is shown I can not Access the Controls on the dialog Resource ( It Does not Respond to mouse pointer)

What should be the problem ?

Thx
x8086
[881 byte] By [x8086] at [2007-11-19 6:41:31]
# 1 Re: Can not Access The Newly Created Form on the Main window.
Are you creating modeless dialog as child of the main frame? If that is a case it is most likely your problem.
Frame window already has a child that frame is resizing.
Your dialog conflicts with this child window.
Why are you creating dialog this way?

Is it MDI or SDI application?
JohnCz at 2007-11-11 0:30:10 >
# 2 Re: Can not Access The Newly Created Form on the Main window.
Hi John can you explain this problem some more clear. Its interesting
Vinod S at 2007-11-11 0:31:14 >
# 3 Re: Can not Access The Newly Created Form on the Main window.
I cannot without you, answering my questions.
Consider to zip entire project. Do not include debug, release, *.ncb, *.opt, *.plg, *.aps and post it.
JohnCz at 2007-11-11 0:32:13 >
# 4 Re: Can not Access The Newly Created Form on the Main window.
Got it i can crating the window in the Frame not on view

when i careate the window in the View Class i Can access the Controls

Thx for Clue

x8086
x8086 at 2007-11-11 0:33:18 >
# 5 Re: Can not Access The Newly Created Form on the Main window.
You can create any window as a child of any other window.
The question is if you benefit from it.

Some window classes in MFC are designed to host other windows some are not.
JohnCz at 2007-11-11 0:34:21 >
# 6 Re: Can not Access The Newly Created Form on the Main window.
Hi John can you explain this problem some more clear. Its interestingCreate dialog with child style and pass main frame pointer as a parent.
You will see what happens.
JohnCz at 2007-11-11 0:35:20 >