Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to add tabs to CView Class? Pin
Victor Nijegorodov5-Mar-18 5:13
Victor Nijegorodov5-Mar-18 5:13 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5795-Mar-18 5:41
Sampath5795-Mar-18 5:41 
GeneralRe: How to add tabs to CView Class? Pin
jeron15-Mar-18 9:31
jeron15-Mar-18 9:31 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5795-Mar-18 18:41
Sampath5795-Mar-18 18:41 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu5-Mar-18 20:42
_Flaviu5-Mar-18 20:42 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5795-Mar-18 20:43
Sampath5795-Mar-18 20:43 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu5-Mar-18 22:03
_Flaviu5-Mar-18 22:03 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5795-Mar-18 22:51
Sampath5795-Mar-18 22:51 
Thank you very much.

It does not work even i followed the same code which you posted now and earlier. You can find the attached image which shows how i created the 5 views in my application using csplitterwnd class. In view 5 i need to add some tabs. I written a class CMyTabClass which derives from CTabView. i given this class as a RUNTIME_CLASS to view 5 as follows:


bStatus = SpliterObj()->CreateView
(
1,
1,
RUNTIME_CLASS(CMyTabClass),
sizeView,
pContext
);

In CMyTabClass i created the tab as follows:

if (!tab.Create(CMFCTabCtrl::STYLE_FLAT, CRect(150, 524, 250, 366), GetSplitter0()->GetPane(0, 0), 1))
{
TRACE0("Failed to create output tab window\n");
return -1; // fail to create
}
Some times i feel the coordinates may be wrong(150,524,250,366) and hence the tab is located out side the view. I changed many times but still the tab is not visible in view 5.

Click below for image Link:

[^]
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu5-Mar-18 23:21
_Flaviu5-Mar-18 23:21 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 0:26
Sampath5796-Mar-18 0:26 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 0:33
_Flaviu6-Mar-18 0:33 
GeneralMessage Closed Pin
6-Mar-18 0:44
Sampath5796-Mar-18 0:44 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 1:16
_Flaviu6-Mar-18 1:16 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 1:44
Sampath5796-Mar-18 1:44 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 1:50
_Flaviu6-Mar-18 1:50 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 4:09
Sampath5796-Mar-18 4:09 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 4:30
_Flaviu6-Mar-18 4:30 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 4:52
Sampath5796-Mar-18 4:52 
GeneralRe: How to add tabs to CView Class? Pin
Sampath57910-Mar-18 22:06
Sampath57910-Mar-18 22:06 
GeneralRe: How to add tabs to CView Class? Pin
Sampath57910-Mar-18 22:10
Sampath57910-Mar-18 22:10 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 0:36
_Flaviu6-Mar-18 0:36 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 0:45
Sampath5796-Mar-18 0:45 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 20:18
Sampath5796-Mar-18 20:18 
GeneralRe: How to add tabs to CView Class? Pin
_Flaviu6-Mar-18 21:01
_Flaviu6-Mar-18 21:01 
GeneralRe: How to add tabs to CView Class? Pin
Sampath5796-Mar-18 21:20
Sampath5796-Mar-18 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.