|
Hello,
I have a couple of problems and general questions:
1. When creating tabs with the CXTTabCtrl and using the method AddView with CXTResizeFormView the last added tab is also the active tab. I want to make the first tab the active tab.
I tried this but it has a painting problem in my formview:
CWnd *pView = m_Tab.GetView(RUNTIME_CLASS(MyFormView)); if (pView){ m_Tab.ActivateView(pView); m_Tab.SetCurSel(0); // Needed because somehow ActivateView doesn't change the tab index
::SetWindowPos(m_Tab.m_hWnd, NULL, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED); m_Tab.Invalidate(FALSE);
} |
Q: How can I set the first tab as active one AND make sure the tab gets painted correctly?
2. When I create a new dialog based on CFormView I can edit the properties of my dialogs, e.g. create a variable for a textbox of the type CEdit. When I subclass the dialog to use CXTResizeFormView instead of CFormView I cannot do this anymore.
Q: How can I somehow let the VIsual Studio know that CXTResizeFormView is in fact derived from CFormView so I can use the normal dialog handling? Now I have to first change all references to CXTResizeFormView back to CFormView before I can edit the variables.
Now some general questions:
1. Can I also use the method as outlined above to get a pointer to a view in the tabcontrol to access member variables and functions if I typecast them to my own formview class?
2. When I add a formview to my tabcontrol the dialog is created "sunken" which makes a rather terrible effect. How do I get rid of that "sunken" effect so the formview appears more as a part of the tabcontrol?
T.I.A,
Martin
|