Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC and Parent Functions

Status
Not open for further replies.

danielp0

Bioengineer
Joined
Jul 4, 2005
Messages
7
Location
CA
hello
I've got a function in the parent class that I want to run from the child window/class

this creates the window :
dlg.DestroyWindow();
dlg.Create(Cdlg::IDD);
dlg.ShowWindow(SW_SHOW);

then I want to run a function :
GetParent()->CZDlg::Function(parameter)

I understand that this is not the right syntax, but maybe someone could point out what it should be

Thanks in advance
 
Code:
((CZDlg*)GetParent())->Function(parameter)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top