Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Form Resizing and WM_NCHITTEST

Posted on 2000-04-28
6
Medium Priority
?
935 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 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