Solved

How to make a resizab;e dialog at only one dimension (height or width)?

Posted on 2001-06-19
4
264 Views
Last Modified: 2013-11-20
How to make a resizab;e dialog at only one dimension (height or width)?
Thanks,
0
Comment
Question by:pbtdanh
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 50 total points
ID: 6207770
Hi!
you can override WM_NCHITTEST
and check for HTBOTTOM (HTTOP) to restrict vertical resizing
or HTLEFT (HTRIGHT) to restrict horz resizing;
for example:

afx_msg UINT CMyDislog::OnNcHitTest( CPoint point )
{
UINT uHt = CDialog::OnNcHitTest(point);
// for example resttrict vert resize:
if (uHt == HTBOTTOM || uHt == HTTOP)
return HTBORDER;
if (uHt == HTTOPLEFT || uHt == HTBITTOMLEFT))
return HTLEFT;
if( uHt == HTTOPRIGHT || uHt == HTBOTTOMRIGHT)
return HTRIGHT;
//default processing
return uHt;
}
0
 

Author Comment

by:pbtdanh
ID: 6210186
Thanks for helping me.
0
 

Author Comment

by:pbtdanh
ID: 6210189
Thanks for helping me.
0
 
LVL 12

Expert Comment

by:migel
ID: 6210723
but why B????
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 126
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 101
canBalance challenge 34 96
Is there a simple front-end menu system. 9 102
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question