Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bug in MTI calculating workspace sizes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in MTI calculating workspace sizes

 Post Reply Post Reply
Author
Message
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Topic: Bug in MTI calculating workspace sizes
    Posted: 31 March 2005 at 8:42pm

In CXTPTabClientWnd::CalcWindowRect every workspace size is calculated as if each workspace has its own splitter, which is not true, there is 1 less splitters than workspaces. The lines are:
rc.bottom = nBottom - SPLITTER_HEIGHT;
and
rc.right = nRight - SPLITTER_HEIGHT;

So the workspaces are slightly not the same size by a few pixels, but this can easily be compensated for above by changing
int nTotalHeight = m_bHorizSplitting? rcClient.Height(): rcClient.Width();
to
int nTotalHeight = (m_bHorizSplitting? rcClient.Height(): rcClient.Width()) + SPLITTER_HEIGHT;

Just adding an extra SPLITTER_HEIGHT into the area used to calculate will offset this difference.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2005 at 4:17am
Thank you. We changed it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2005 at 12:33pm

This bug is still present in v9.70...

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2005 at 12:52pm

The problem is now in CXTPTabClientWnd::DoWorkspaceCommand and it is simple to fix.
Just change the line in the ACTION_INSERTHORIZ and ACTION_INSERTVERT cases from:
                pWorkspace->m_dHeight = pFocusWorksapce->m_dHeight / 2;
to:
                pWorkspace->m_dHeight = (pFocusWorksapce->m_dHeight - m_nSplitterSize) / 2;


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2005 at 2:16am
Fixed.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.047 seconds.