Solved

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

Posted on 2001-06-19
4
260 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatSeparator  java  challenge 13 57
WinWaitActive parameters 12 31
tripleUp challenge 7 78
abstract class with all non abstract mentods 6 76
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

776 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