Print Page | Close Window

Limit which side to resize

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=3005
Printed Date: 09 November 2025 at 6:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Limit which side to resize
Posted By: Dmitry
Subject: Limit which side to resize
Date Posted: 04 October 2005 at 11:29pm
Hi,

Is there a possibility to limit which side is allowed to be resized in CXTPDialogBar?

For example, i would like to only allow vertical resizing, but not horizontal. (In both docked and floating modes.)

If not, perhaps CXTPDialogBar::SetResizable can be enhanced to support an enum:

enum ResizeDirection
{
     RD_NONE = 0x0000,

           // resize one side only
     RD_LEFT = 0x0001,
     RD_RIGHT = 0x0002,
     RD_TOP = 0x0004,
     RD_BOTTOM = 0x0008,

           // resize two sides
     RD_HORIZONTAL = RD_LEFT | RD_RIGHT,
     RD_VERTICAL = RD_TOP | RD_BOTTOM,
     RD_BOTTOM_LEFT = RD_BOTTOM | RD_LEFT,
     RD_BOTTOM_RIGHT = RD_BOTTOM | RD_RIGHT,
     RD_TOP_LEFT = RD_TOP | RD_LEFT,
     RD_TOP_RIGHT = RD_TOP | RD_RIGHT,

           // resize three sides
     RD_LEFT_TOP_RIGHT = RD_LEFT | RD_TOP | RD_RIGHT,
     RD_LEFT_BOTTOM_RIGHT = RD_LEFT | RD_BOTTOM | RD_RIGHT,
     RD_TOP_RIGHT_BOTTOM = RD_TOP | RD_RIGHT | RD_BOTTOM,
     RD_TOP_LEFT_BOTTOM = RD_TOP | RD_LEFT | RD_BOTTOM,

           // resize everything (default)
     RD_ALL = RD_LEFT | RD_RIGHT | RD_TOP | RD_BOTTOM,
};

eg:

void CXTPDialogBar::SetResizable (ResizeDirection rd = RD_ALL);

Regards,
Dmitry                              



Replies:
Posted By: Oleg
Date Posted: 04 October 2005 at 11:54pm

You can create class from CXTPDialogBar and catch WM_NCHITTEST:

LRESULT CResizableDialogBar::OnNcHitTest(CPoint point)

{

...
}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Dmitry
Date Posted: 05 October 2005 at 12:08am
Thanks Oleg.

ps: bol'shoye spasibo za bystriy otvet :)



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