Click here to Skip to main content
15,894,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt14-Mar-18 22:44
professionalJochen Arndt14-Mar-18 22:44 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu14-Mar-18 23:16
_Flaviu14-Mar-18 23:16 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt14-Mar-18 23:24
professionalJochen Arndt14-Mar-18 23:24 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu14-Mar-18 23:37
_Flaviu14-Mar-18 23:37 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Jochen Arndt15-Mar-18 0:43
professionalJochen Arndt15-Mar-18 0:43 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu15-Mar-18 1:16
_Flaviu15-Mar-18 1:16 
AnswerRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov15-Mar-18 3:04
Victor Nijegorodov15-Mar-18 3:04 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu16-Mar-18 0:57
_Flaviu16-Mar-18 0:57 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov16-Mar-18 3:18
Victor Nijegorodov16-Mar-18 3:18 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
_Flaviu19-Mar-18 0:26
_Flaviu19-Mar-18 0:26 
GeneralRe: NM_RDBLCLK not working for CTreeCtrl Pin
Victor Nijegorodov20-Mar-18 9:23
Victor Nijegorodov20-Mar-18 9:23 
QuestionSingle View with Multiple Tabs in MFC Pin
Sampath57912-Mar-18 22:51
Sampath57912-Mar-18 22:51 
QuestionRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 22:59
mveRichard MacCutchan12-Mar-18 22:59 
AnswerRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:04
Sampath57912-Mar-18 23:04 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:15
mveRichard MacCutchan12-Mar-18 23:15 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:17
Sampath57912-Mar-18 23:17 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:32
mveRichard MacCutchan12-Mar-18 23:32 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:44
Sampath57912-Mar-18 23:44 
GeneralRe: TabbedPane vs TabView Pin
Richard MacCutchan12-Mar-18 23:53
mveRichard MacCutchan12-Mar-18 23:53 
GeneralRe: TabbedPane vs TabView Pin
Sampath57912-Mar-18 23:59
Sampath57912-Mar-18 23:59 
GeneralRe: TabbedPane vs TabView Pin
Victor Nijegorodov13-Mar-18 1:25
Victor Nijegorodov13-Mar-18 1:25 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 6:14
Sampath57913-Mar-18 6:14 
ok. How can it solve my problem.

class MyMainClass : public CScrollView
{
   int OnCreate(LPCREATESTRUCT lpCreateStruct);
}

int MyMainClass::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CScrollView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	//CRect rect;
	//GetWindowRect(rect);
	if (!tab.Create(CMFCTabCtrl::STYLE_FLAT, CRect(0,0,100,100), this, 1))
	{
		TRACE0("Failed to create output tab window\n");
		return -1;      // fail to create
	}
	tab.AddTab(this, _T("tab1"),101);
	tab.AddTab(this, _T("tab1"),102);
	// TODO:  Add your specialized creation code here

	return 0;
}


Above piece of code created a tabcontrol with 2 tabs on it. But with out some view on this window how can i render some thing.

sorry if i miss anything to create view. Do i need to inherit my class from CMFCtabCtrl or is it ok even if i inherit from CScrollView?

Also when i select the second tab, my application is getting hanged. What could be the reason?

Edit 2:
I have gone through some examples and understood that, "this" in below call created issues.

tab.AddTab(this, _T("tab1"),101)


instead of this, we need to provide the control we are going to add to that tab control. For eg;
CEdit edit;
we need to give &edit instead of this. I saw this in microsoft samples.

This also does not solve my problem. In case if i have 3 tabs, then i need to create 3 CViews and add them to tabcontrol. Again this is like kind of creating new view for each tab.

But i want only one view and different tabs.

modified 13-Mar-18 13:32pm.

GeneralRe: TabbedPane vs TabView Pin
Victor Nijegorodov13-Mar-18 9:29
Victor Nijegorodov13-Mar-18 9:29 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 17:59
Sampath57913-Mar-18 17:59 
GeneralRe: TabbedPane vs TabView Pin
Sampath57913-Mar-18 19:05
Sampath57913-Mar-18 19:05 

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.