Calling the functions from different class
-
Hello all, im very much confused with this make this snippet work,, let me explain my problem in simple. please follow the folling code. class ClassA { public: function_A(); function_B(); } class Class1 { public: ClassA A1 Function_1(); } class Class1::Function_1() { Dlg1.DoModal(); A1.function_A(); A1.function_B(); } class ClassDlg { FunDlg(); } ClassDlg::OnRefresh() { i wanted "A1.function_A();" i wanted "A1.function_B();" } The Dialog window will be called by "Class1::Function_1()" so after closing the dialog window the function "A1.function_A();" and "A1.function_B();" are called in order to update the contents of the mainpage(say property page). actually the contents are modified in the dialog window. so what i wanted to do is call the functions "A1.function_A();" and "A1.function_B();" before closing the dialog window say at after pressing the"Refresh" button(OnRefresh will be called). Im confused its not just happening what i desired. can any expert give me a solution, like is there any try statement i can give..?? please help me...
-
Hello all, im very much confused with this make this snippet work,, let me explain my problem in simple. please follow the folling code. class ClassA { public: function_A(); function_B(); } class Class1 { public: ClassA A1 Function_1(); } class Class1::Function_1() { Dlg1.DoModal(); A1.function_A(); A1.function_B(); } class ClassDlg { FunDlg(); } ClassDlg::OnRefresh() { i wanted "A1.function_A();" i wanted "A1.function_B();" } The Dialog window will be called by "Class1::Function_1()" so after closing the dialog window the function "A1.function_A();" and "A1.function_B();" are called in order to update the contents of the mainpage(say property page). actually the contents are modified in the dialog window. so what i wanted to do is call the functions "A1.function_A();" and "A1.function_B();" before closing the dialog window say at after pressing the"Refresh" button(OnRefresh will be called). Im confused its not just happening what i desired. can any expert give me a solution, like is there any try statement i can give..?? please help me...
From your question it seems that you want to call the function of classA from ClassDlg. Why don't you create the object for class A in ClassDlg as well as you do in Class1? or please rephrase your question if I understood incorrectly.
You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_
-
From your question it seems that you want to call the function of classA from ClassDlg. Why don't you create the object for class A in ClassDlg as well as you do in Class1? or please rephrase your question if I understood incorrectly.
You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_
Hi anshuman, thanks for your reply, Actually,A1(object of ClassA) is like a handle to the table in the mainpage(flex grid). if i create 2 bjects that will create 2 flex grids. Instead i just wanted to update the already created table contents by this object A1. "Dlg1" is the object of class "ClassDlg" where class ClassDlg { public: FunDlg(); OnRefresh() } i just wanted to call these function say "A1.function_A(); and A1.function_B();" inside the member function of class ClassDlg.