[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2001-06-19
4
Medium Priority
?
300 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 150 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 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