News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Sizing hands arround a control

Started by ToutEnMasm, July 17, 2006, 01:01:33 PM

Previous topic - Next topic

ToutEnMasm

Hello,
I search what is the best method to put sizing hands arround a control.
For example,surounding the control with rectangles than you can move with the mouse.
                     Thanks for answer.

sluggy

Can you explain more what you mean? Is there an application that does this (has this technique) already?

ToutEnMasm


A sample,perhaps can explain more.
With ResourceStudio(downloadable on this site),when you put a control on a dialog window , the control is surrounding by thin blue line with small square in the middle of the line.
That is what i search to do,or something like that.
                                  ToutEnMasm

akalenuk

Quote from: ToutEnMasm on July 17, 2006, 01:01:33 PM
I search what is the best method to put sizing hands arround a control.
For example,surounding the control with rectangles than you can move with the mouse.

I used to track a WM_LBUTTONDOWN message on the window, than the control lies on, then ckeck if lParam high (Y) and low (X) word are in the area for sizing, then

invoke  SendMessage,hEdit,WM_NCLBUTTONDOWN,HTRIGHT,lParam

to stretch a control, for example, horisontaly.
Or you can place a speciall windows (static controls?) around the sizable control, then move them together with the control within the control's WM_SIZE message. This way you don't have check anything.

zcoder

I am not sure if this is what you are talking about or not
look at this example program I wrote real quick and tell me if this
is the kind of controls you are talking about.

Zcoder....

[attachment deleted by admin]
Back in 1979, My computer ran so fine.
And there was no such thing,
As a Microsoft Crashed Machine.
http://zcoder.110mb.com
http://www.dietzel.com/partner/idevaffiliate.php?id=345_6  Free Domain Names

zooba

That's a very nice example Zcoder. You should put the source up somewhere. Maybe even submit it to Hutch-- for the MASM32 package or PBrennick for GeneSys.

Though it seemed to add some folders to the list more than once...

Cheers,

Zooba :U

ToutEnMasm


To zcoder,
Yes it is that,can i have the piece of code that made that ?
                                       ToutEnMasm

zcoder

ToutEnMasm,
The app I just showed you, was made using OBJ's, OPP, and subclassing.
the app can make over 30 controls but I just poped two of them on there
so you could see if it's what you was talking about. thats why the exe file
was about 40K.  :bg

It would be hard to learn from such an example so what I can do is write one
that does one control, so it would be smaller, cleaner code for you to learn
from. And it would be easier then to expand from there.

All the controls use the same main control(OPP) and all controls use
the same module to create each control. then there is a OPP module
that does the sizing grips, and yet another OPP module that does
the rect drawing. then I am not sure if you noticed but if you
right click on one of them you will see a menu, that is another
OPP module.  I disabled the double click of the control which
would show you the code area where you would write code
for that control's actions ect.

It's a strange way to program, but it's what I found to be the easyest
way, in oder to make a complex code, so I pullled OBJ, OPP, & subclassing
all to gather to create a easy to manage, code in many obj files which
I can access all of them from my IDE in one project.

So please give me some time, and I will write one you will be pleased with
and I am sure you will learn from. and you will also gain more insight on
working with OBJ, OPP, & subclassing.

On second thought I will make one to do more then one control
without all the other stuff, so you can learn how they all work
together.

So if your patient I will start on that right away.

The reason why I need to redo it all is becouse this is out of my Zeta32
project, and the code does ALOT that is disabled just to do controls,
like the property sheet, the form where you add your controls ect.

I susspect that you are going to make a RC style app, and so I need
the time to create one with out all the other Zeta32 stuff in it so you
would have a better chance getting it to work in your own app.

oh, and all I need to know is do you want the right click menu
in it or should I remove that so you can make things the way
you plan on using them?

Zcoder....
Back in 1979, My computer ran so fine.
And there was no such thing,
As a Microsoft Crashed Machine.
http://zcoder.110mb.com
http://www.dietzel.com/partner/idevaffiliate.php?id=345_6  Free Domain Names

ToutEnMasm

Hello,
Thanks for all your works.
The right click on the control can be useful.
If you suspect me to write something like resourcestudio , it's not really that.
I want something that write controls directly in the source code (not in the resource,this exist) and can modify it if necessary.
I have the way and the needed material,a complete database on the common controls that I have write .The source of the database will be on my site soon i finish to verify it.
The only thing i haven't it's the way to show the sizing hands arround the controls when they are clicked.
A sample who made that with only an edit control or a listbox without anything else can be perfect.
                                             ToutEnMasm



                                         

zcoder

#9
Ok, I made this example with ALL the source code included so you
can learn how to make controls like those found in RC editors or
visual IDE's.

This example will do about 10 types of controls.

I don't use any IDE found out on the net, instead I use my own I wrote "Altra32"
you can feel free to download it to play with this example at: http://www.masmwizard.com

Alot of it is in OBJ's so it should not be too hard to port to MASM32 or another IDE.
if you have problems porting it, try to use my IDE so you can see just what the layout
is, then it might become clearer. :bg

Otherwise you can feel free to PM me with questions.

Zcoder....

Back in 1979, My computer ran so fine.
And there was no such thing,
As a Microsoft Crashed Machine.
http://zcoder.110mb.com
http://www.dietzel.com/partner/idevaffiliate.php?id=345_6  Free Domain Names

drizz

[i skimishly (<-not sure if this is correct :P ) read the thread]

btw, KetilO's ResEd source is available at his site (iirc)
The truth cannot be learned ... it can only be recognized.

zcoder

Quote from: drizz on July 20, 2006, 05:32:29 PM
[i skimishly (<-not sure if this is correct :P ) read the thread]

btw, KetilO's ResEd source is available at his site (iirc)


I guess it's not needed then.

Zcoder....
Back in 1979, My computer ran so fine.
And there was no such thing,
As a Microsoft Crashed Machine.
http://zcoder.110mb.com
http://www.dietzel.com/partner/idevaffiliate.php?id=345_6  Free Domain Names

ToutEnMasm

#12
Hello,
After a little searching i found the solution.
Create a STATIC contrôle with no extended style and with this styles:
SS_BITMAP or WS_VISIBLE or WS_CHILD or WS_DISABLED
Two properties are important:
SS_BITMAP  allow to give a look at the point by using a bitmap (8*8).
WS_DISABLED allow the mother to keep the WM_MOUSEMOVE event when the cursor is on the point.
At each move of the cursor,windows send a WM_SETCURSOR message,it is here that setcursor must be used.

                          ToutEnMasm