![]() |
Limit which side to resize |
Post Reply
|
| Author | |
Dmitry
Groupie
Joined: 28 November 2004 Location: Australia Status: Offline Points: 31 |
Post Options
Thanks(0)
Quote Reply
Topic: Limit which side to resizePosted: 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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Dmitry
Groupie
Joined: 28 November 2004 Location: Australia Status: Offline Points: 31 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2005 at 12:08am |
|
Thanks Oleg.
ps: bol'shoye spasibo za bystriy otvet :) |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |