Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have a MyDialog dialogBox and it has MyTab control.

MyDialog.h file is
C++
#include "MyTab.h"
class MyDialog: public CDialog
		{
virtual BOOL OnInitDialog();
private:
afx_msg void abc();	
static void MyFunction( int, unsigned int);
		
public:
MyTab m_cTab; //do this

}


MyDialog.cpp file is

C++
bool  MyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
	m_cTab.Init(); //here call to MyTab's method successfully.
}


and
MyTab .h file is
C++
class MyTab :public CTabCtrl
{
void Init();
}

and MyTab.cpp file is
C++
void MyTab::Init()
{
	// do something 	
			
}


I want to know how to call MyDialog class method that is abc() and MyFunction in MyTab class?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900