![]() |
CXTExcelTabCtrl and CView Client Area |
Post Reply ![]() |
Author | |
asparagusx ![]() Groupie ![]() Joined: 06 February 2007 Status: Offline Points: 57 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |