Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: TabControl
Hi,
Am strugling with a static tab control.
Problem is the Tab control is statically placed on a dialog which is having two group boxes. One is parent group box inside which another group box is present. And the tab control i have placed here.
 
When i run the application, the Tab control is getting hidden and if i click on the area where i have placed the Tab, it gets displayed. Similar behaviour on switching the view, minimizing,maximaise and resizing.
 

I have modified even the Tab order properly to make Tab control should get the first priority. but nothing is working.
 
Below is the code which i have written to add pages:
	CString tabTitle;
	TC_ITEM tabCtrlItem;
	memset(&tabCtrlItem, 0, sizeof(tabCtrlItem));
	eReconTab.ModifyStyle( WS_VISIBLE | WS_CHILD, 0,SWP_SHOWWINDOW);
	//FBP Page
	if (!eNMFBPPage.Create(this))
	{
	  return FALSE;
	}
		
	tabTitle = _T("FBP");
	tabCtrlItem.mask = TCIF_TEXT|TCIF_IMAGE|TCIF_PARAM;
	tabCtrlItem.pszText = tabTitle.GetBuffer(0);
	tabCtrlItem.iImage = -1;
	tabCtrlItem.lParam = (LPARAM)(CWnd*)&eNMFBPPage;
	eReconTab.InsertItem(0, &tabCtrlItem);
	
	tabTitle.ReleaseBuffer(-1);
	
	CRect tabRect;
	eReconTab.GetWindowRect(&tabRect);
	ScreenToClient(tabRect);
	eReconTab.AdjustRect(FALSE, tabRect);
	
	eNMFBPPage.MoveWindow(tabRect);
 
	eReconTab.SetCurSel(0);
	eNMFBPPage.ShowWindow(SW_SHOW);
 
Pages and all gets added properly. Only problem is the Tab control is getting hidden until i click on the area.
tried with SetWindowPos and all. No Solution. If i delete both group box then it works fine.
 
Please any body help........
Posted 9-Apr-12 4:01am
Edited 9-Apr-12 4:15am
v2
Comments
SAKryukov at 9-Apr-12 12:07pm
   
Tag everything properly: platform, language, UI library used. Yes, I can guess, so what? Specify every relevant detail. "Improve question" is above.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 400
1 Jochen Arndt 200
2 Richard MacCutchan 135
3 DamithSL 95
4 Maciej Los 95
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 9 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100