Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Minimum docked window size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Minimum docked window size

 Post Reply Post Reply
Author
Message
gary View Drop Down
Newbie
Newbie


Joined: 18 August 2003
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gary Quote  Post ReplyReply Direct Link To This Post Topic: Minimum docked window size
    Posted: 18 August 2003 at 6:21am
I have a window for which there must be a minimum size, that is, it should not be possible for the user to size the window so that it is less than some specific width.

When using Xtreme Toolkit 1.9.3.1 I had a solution to this (basically, I just simulate the window being resized back to its minimum size by sending the correct messages) but we now have to upgrade to 3.1 and the solution no longer works - the WM_NCLBUTTONDOWN I send to the window's m_pDockBar member causes an assertion in CXTDockBar's splitter array (I think the splitter has been removed from the array by the time I send the message).

Does anyone have any other ideas how I can achieve the same effect, or a solution to the above problem, please?

(This was previously sent by email to Codejock but they haven't replied yet.)
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: 19 August 2003 at 3:10am

Use WM_GETMINMAXINFO message:

 

BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)

ON_WM_GETMINMAXINFO()

END_MESSAGE_MAP()

 

void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)

{

lpMMI->ptMinTrackSize.x = 400;

lpMMI->ptMinTrackSize.y = 400;

CMDIFrameWnd::OnGetMinMaxInfo(lpMMI);

}

Back to Top
gary View Drop Down
Newbie
Newbie


Joined: 18 August 2003
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gary Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2003 at 3:53am
Originally posted by oleg oleg wrote:

Use WM_GETMINMAXINFO message:



Sorry Oleg, but that plain just does not work. The window in question never receives such a message. (Note: it is not the main frame window that I am trying to restrict to a certain size, but a CXTDockWindow derived window docked to the main window.)
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.156 seconds.