[comp.os.os2.programmer] FCF_SIZEBORDER

jaz@icd.ab.com (Jack A. Zucker) (11/21/90)

I'm writing an application that allows the user to drag things around
on the screen and resize them. Right now the user "selects" an item 
and I draw a box around the item using the FM_NOTXORSRC mix parameter.

This works fine but I notice that in the Dialog Box editor that it looks
as if they are using an FCF_SIZEBORDER window for selection and moving.
This could possibly simplify my program by not having to handle the sizing,
(I don't know about the moving) but when I draw a window with this border,
I don't know how to control such things as the min and max size. Is it 
possible to set this stuff up ? For example, this window with the 
FCF_SIZEBORDER doesn't seem to go quite small enough for the objects
that I'm representing.

-Jaz


| Jack A Zucker	                 {cwjcc,pyramid,decvax,uunet}!jaz@icd.ab.com |
| Allen-Bradley Company, Inc.     or                       ICCGCC::ZUCKER    |
| 747 Alpha Drive                 
| Highland Hts., OH 44143         phone: (216) 646-4668   FAX: (216)
646-4484 | 

lsalomo@hubcap.clemson.edu (lsalomo) (11/27/90)

From article <1972@abvax.UUCP>, by jaz@icd.ab.com (Jack A. Zucker):
> I'm writing an application that allows the user to drag things around
> on the screen and resize them. Right now the user "selects" an item 
> and I draw a box around the item using the FM_NOTXORSRC mix parameter.
> 
> This works fine but I notice that in the Dialog Box editor that it looks
> as if they are using an FCF_SIZEBORDER window for selection and moving.
> This could possibly simplify my program by not having to handle the sizing,
> (I don't know about the moving) but when I draw a window with this border,
> I don't know how to control such things as the min and max size. Is it 
> possible to set this stuff up ? For example, this window with the 
> FCF_SIZEBORDER doesn't seem to go quite small enough for the objects
> that I'm representing.

What you could probably do is, when the user selects an item, delete the item,
create a frame window where the item was using WinCalcFrameRects (I think
that's the API name) to figure out how big the frame should be to get a client
with the same size as the window that you deleted was, let the user size the
item (make sure that you have the client of the new frame to be of the same
window class as the deleted window was.  This'll let the frame resize it
automagically...), then query the client size, WinDestroyWindow the frame,
and recreate the window with the new size...


Cheers,
Q - the "Q"uestor for knowledge (, a degree, etc.)

lsalomo@hubcap.clemson.edu
ibmman@clemson.clemson.edu
=============================================================================
"Gee Wally, I think there's something wrong with the Beaver."
=============================================================================