Hi,
I'm working on a project with a tab control which has 2 tabs. Clicking on each tab activates an appropriate view class. When user clicks one tab the below code is activated in OnselChange function :
pMainFr->m_Splitter2.DeleteView( 1, 0 );
pMainFr->m_Splitter2.CreateView( 1, 0, RUNTIME_CLASS( CNumerikView ), CSize( 0, 0 ), NULL );
pMainFr->m_Splitter2.SetActivePane( 1, 0 );
pMainFr->m_Splitter2.RecalcLayout();
pMainFr->m_Splitter2.RedrawWindow();
But with this approach, when i try to set some variables of the view class, they are deleted before i update the view.
I can't create instances of these classes because they have protected constructors.
So, what i want to know is this method, i mean setting or getting variables by pointers with such type casting? Is it
"programmatically correct"? If not, could you please give me some clues for doing it right.
Thank you very much.
I'm working on a project with a tab control which has 2 tabs. Clicking on each tab activates an appropriate view class. When user clicks one tab the below code is activated in OnselChange function :
pMainFr->m_Splitter2.DeleteView( 1, 0 );
pMainFr->m_Splitter2.CreateView( 1, 0, RUNTIME_CLASS( CNumerikView ), CSize( 0, 0 ), NULL );
pMainFr->m_Splitter2.SetActivePane( 1, 0 );
pMainFr->m_Splitter2.RecalcLayout();
pMainFr->m_Splitter2.RedrawWindow();
But with this approach, when i try to set some variables of the view class, they are deleted before i update the view.
I can't create instances of these classes because they have protected constructors.
So, what i want to know is this method, i mean setting or getting variables by pointers with such type casting? Is it
"programmatically correct"? If not, could you please give me some clues for doing it right.
Thank you very much.