Click here to Skip to main content
15,921,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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:
C#
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
Updated 9-Apr-12 3:15am
v2
Comments
Sergey Alexandrovich Kryukov 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900