Print Page | Close Window

Minimum docked window size

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=134
Printed Date: 05 January 2025 at 5:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Minimum docked window size
Posted By: gary
Subject: Minimum docked window size
Date 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.)



Replies:
Posted By: Oleg
Date 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);

}



Posted By: gary
Date 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.)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net