?
Solved

Form Resizing and WM_NCHITTEST

Posted on 2000-04-28
6
Medium Priority
?
926 Views
Last Modified: 2010-05-19
I want to create a size grip control that acts like the size grip on the status bar. But you should be able to set it on every control (not just on the form itself). It should be aligned at every edge of the parent control.
What I tried is to create a control and catch the WM_NCHITTEST of the parent form and the control itself. This worked but only if the controls parent was the form itself, cause windows doesn't send the WM_NCHITTEST message to the form if a control answered it positive. Any idea how I can make the control resizing the form.
Please don't post answers like mouse catching and just call ParentForm.SetBounds(...). I know doing that.
But your comments are always welcome >;o}
Thanx for your help, ptm.
0
Comment
Question by:ptmcomp
[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
6 Comments
 
LVL 3

Expert Comment

by:shenqw
ID: 2760846
listen
0
 
LVL 3

Expert Comment

by:raidos
ID: 2761723
Hmmz...

If you can catch the mousedown event
on your "size grip" this shouldn't be to difficult.

On the MouseDown event just do something like this.

Begin
  releasecapture;
  <Parent>.Perform(WM_Syscommand, $F008,0);
End;

That's atleast one way of resizing Components/Forms.

Good luck.

//raidos
0
 
LVL 10

Author Comment

by:ptmcomp
ID: 2761839
After I went to bed last night, I had the same Idea. But I think it works only for the bottom right edge and only if the window has a system menu. (My window is a toolsizewindow.)
Well I'll try it today.
Regards, ptm.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
shenqw earned 600 total points
ID: 2763273
$f001:  left
$f002:  right
$f003:  top
$f004:  top_left
$f005:  top_right
$f006:  bottom
$f007:  left_bottm
$f008:  bottom_right
0
 
LVL 10

Author Comment

by:ptmcomp
ID: 2767524
Where did you got this constants?
To raidos: Sorry I can't grade both of you. Shengw helped me more, because he knew the constants diffrent from SC_SIZE.
Thanks a lot, ptm.
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2782733
listenning
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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