Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - (11.2)Bug in "Codejock Command Bar Dialog Sample"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

(11.2)Bug in "Codejock Command Bar Dialog Sample"

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


Joined: 21 April 2005
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote tNgLoo Quote  Post ReplyReply Direct Link To This Post Topic: (11.2)Bug in "Codejock Command Bar Dialog Sample"
    Posted: 17 September 2007 at 8:08am
Open this "Codejock Command Bar Dialog Sample", modify the dialog(IDD_DIALOGSAMPLE_DIALOG) resource, set "Minimize Box" property to "True", and compile and run.
When this dialog restored after minimized, the size of it (right side) changed!????
 
Back to Top
tNgLoo View Drop Down
Groupie
Groupie


Joined: 21 April 2005
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote tNgLoo Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2007 at 8:57am
this bug is Based from CXTResizeDialog. Any dialog whose base class is CXTResizeDialog has same problem
Back to Top
tNgLoo View Drop Down
Groupie
Groupie


Joined: 21 April 2005
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote tNgLoo Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2007 at 9:37am
// my solution,  verified.
 
void CXTResize::GetMinMaxInfo(MINMAXINFO* pMMI)
{
 CXTPClientRect rcClient(m_pWnd);
 CXTPWindowRect rcWindow(m_pWnd);
// Add 1 line
 if(rcClient.IsRectEmpty()) return;

 CSize szBorder(rcWindow.Width() - rcClient.Width(), rcWindow.Height() - rcClient.Height());

 if (m_szWindow != CSize(0, 0))
 {
  if (HasFlag(xtResizeNoHorizontal))
  {
   pMMI->ptMaxTrackSize.x = pMMI->ptMaxSize.x = m_szWindow.cx + szBorder.cx;
  }
  if (HasFlag(xtResizeNoVertical))
  {
   pMMI->ptMaxTrackSize.y = pMMI->ptMaxSize.y = m_szWindow.cy + szBorder.cy;
  }
 }
 if (m_szMin.cx != 0) pMMI->ptMinTrackSize.x = m_szMin.cx + szBorder.cx;
 if (m_szMin.cy != 0) pMMI->ptMinTrackSize.y = m_szMin.cy + szBorder.cy;
 if (m_szMax.cx != 0) pMMI->ptMaxTrackSize.x = m_szMax.cx + szBorder.cx;
 if (m_szMax.cy != 0) pMMI->ptMaxTrackSize.y = m_szMax.cy + szBorder.cy;
}

Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2007 at 12:29pm
Was this solution agreed by XTP that is what they are adding ? please
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 18 September 2007 at 1:53am

Yes, its good solution.

Thanks
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.203 seconds.