Print Page | Close Window

CXTExcelTabCtrl and CView Client Area

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=14188
Printed Date: 22 June 2025 at 2:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTExcelTabCtrl and CView Client Area
Posted By: asparagusx
Subject: CXTExcelTabCtrl and CView Client Area
Date Posted: 30 April 2009 at 12:19pm
Hallo
 
I am having a problem when using OnSize of my view derived class. I have a CXTExcelTabCtrl derived class which is created as follows :
 

bool CGenes1sView::CreateDwgTabs(void)

{

CXTPEmptyRect rTab;

DwgTabs = new CDwgTab(this);

if (DwgTabs->Create(WS_CHILD | WS_VISIBLE | DwgTabStyle, rTab, this, IDC_DWG_TABS))

{

DwgTabs->Rebuild();

ShowScrollBar(SB_HORZ,FALSE);

}

return true;

}

My problem is that the client area of my view, still 'includes' the tabs (created at the bottom of the view). This is some code from my OnSize function :
 

CRect newsize(0,0,cx,cy);

int Height = (GetViewType() == VIEWTYPE_3D) ? 0 : ::GetSystemMetrics(SM_CXHTHUMB);

newsize.bottom -= Height;

Trace(false,"OnSize cx cy %d %d newsize %d %d",cx,cy,newsize.Width(),newsize.Height());

if (IsWin(DwgTabs))

DwgTabs->SetWindowPos(NULL, 0,newsize.bottom, newsize.Width(), Height,SWP_SHOWWINDOW | SWP_FRAMECHANGED | SWP_NOZORDER);

CView::OnSize(nType,newsize.Width(),newsize.Height());

 
Newsize is correctly updated e.g. it the size of the view, less than the height of the tabs, but the view still thinks that the tabs are not there. Has anybody got any ideas as to what I might be doing wrong.
 
Regards
 
Anton
 
 
 



Replies:
Posted By: mgampi
Date Posted: 09 May 2009 at 5:14am
Hi;
Try using CXTPTabControl. We had similar problems and fixed them by using this control instead of CXTExcelTabCtrl. CXTExcelTabCtrl is not intented to be used as a control container...


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net