class MyMainClass : public CTabView
int OnCreate(LPCREATESTRUCT lpCreateStruct);
int MyMainClass::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CTabView::OnCreate(lpCreateStruct) == -1)
class CDrawingView : public CScrollView
/.... rendering logic.
So, each time i call AddView() the CDrawingView class is getting instantiated and new view is getting created. Instead only one view should be available and new tabs should get created.
The whole point of using AddView is to add a new View to the tab group. The documentation (CTabView::AddView[^])
makes it clear that it creates a new View for each call. If you want a single View then you will need to find an alternative to the CTabView control.
Which class should i take in order to display my drawings in the view. I tried with CView and CScrollView. Both the classes contains virtual functions and it showing error. I need a view where mouse down , mouse up, mouse wheel should work on it.
In my MFC application, i created a class which is derived from CTabView and created few tabs(views) using AddView(). Now i want to change the color of the tab views. May i know how to change the background color of those views?