Click here to Skip to main content
15,922,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: debugging a Boost serialization assertion Pin
Alexander Kindel5-Mar-18 23:48
Alexander Kindel5-Mar-18 23:48 
QuestionDouble Click on ProgressBar Pin
Fedrer5-Mar-18 20:09
Fedrer5-Mar-18 20:09 
QuestionRe: Double Click on ProgressBar Pin
Maciej Los5-Mar-18 20:24
mveMaciej Los5-Mar-18 20:24 
AnswerRe: Double Click on ProgressBar Pin
Fedrer5-Mar-18 20:42
Fedrer5-Mar-18 20:42 
QuestionRe: Double Click on ProgressBar Pin
David Crow6-Mar-18 2:24
David Crow6-Mar-18 2:24 
AnswerRe: Double Click on ProgressBar Pin
Victor Nijegorodov5-Mar-18 21:16
Victor Nijegorodov5-Mar-18 21:16 
QuestionHow to add tabs to CView Class? Pin
Sampath5794-Mar-18 22:42
Sampath5794-Mar-18 22:42 
AnswerRe: How to add tabs to CView Class? Pin
Victor Nijegorodov5-Mar-18 5:13
Victor Nijegorodov5-Mar-18 5:13 
Member 10253026 wrote:
CMFCTabCtrl tab;
                if (!tab.Create(CMFCTabCtrl::STYLE_FLAT, CRect(150, 100, 0, 0), GetSplitterObj()->GetPane(1, 1), 1))
                {
                    TRACE0("Failed to create output tab window\n");
                    return -1;      // fail to create
                }
On Pane(1,1) i need to add tabs, and hence i added above piece of code to create MFC tab. Creation of tab is successful. It returned TRUE, but tab is not visible on that view(window).

May i know what mistake i done in adding a tab to that CView window?

Your CMFCTabCtrl tab; is defined locally. So it goes out of scope after you return from the method where you create the Views.
Try to make the CMFCTabCtrl tab; the class member.
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 
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 

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.