Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTExcelTabCtrl and CView Client Area
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTExcelTabCtrl and CView Client Area

 Post Reply Post Reply
Author
Message
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Topic: CXTExcelTabCtrl and CView Client Area
    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
 
 
 
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.035 seconds.