P
Piotr Getka
Hi
I have 3 classes:
- CMainFrame
- CPitApp
- CPitView
In class CPitApp i create object CMainFrame* pMainFrame = new
CMainFrame
and in class CMainFrame there is:
public:
int nIndex
And now the question
How can I refer in method OnPrint in class CPitView, that is
CPitView::OnPrint,
to a value of variable nIndex from class CMainFrame??
Is there a way of doing this without creating an object of class
CMainFrame or do i have to create it, and if so how to create it that
it will contains the same data that have object pMainFrame from
CPitApp??
I'm using MF. CMainFrame contains toolbar:
protected: CStyleBar m_wndStyleBar;
and CStyleBar have:
public:
CComboBox m_comboBox;
I simply want to use value returned by
m_wndStyleBar.m_comboBox.GetCurSel()
in method
void CPitView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
Thanks.
I have 3 classes:
- CMainFrame
- CPitApp
- CPitView
In class CPitApp i create object CMainFrame* pMainFrame = new
CMainFrame
and in class CMainFrame there is:
public:
int nIndex
And now the question
How can I refer in method OnPrint in class CPitView, that is
CPitView::OnPrint,
to a value of variable nIndex from class CMainFrame??
Is there a way of doing this without creating an object of class
CMainFrame or do i have to create it, and if so how to create it that
it will contains the same data that have object pMainFrame from
CPitApp??
I'm using MF. CMainFrame contains toolbar:
protected: CStyleBar m_wndStyleBar;
and CStyleBar have:
public:
CComboBox m_comboBox;
I simply want to use value returned by
m_wndStyleBar.m_comboBox.GetCurSel()
in method
void CPitView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
Thanks.