FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to draw a resizable rectangle
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
How to draw a resizable rectangle
Posted: Tue Feb 07, 2006 01:17 PM

Anybody could give me an idea about how to draw a resizable rectangle on a Dialog?. I mean, the kind of rectangle used to select a region of a Bitmap, that expands and contacts as you move the mouse. I have tried several aproaches with Rectange(), RectDot() and LineTo() but I am sure it must be a simpler way.
Thanks
Rafael

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
How to draw a resizable rectangle
Posted: Tue Feb 07, 2006 06:09 PM

Rafael,

You might look at the incomplete IDE samples that come with FW. I can't remember if there was such an thing for dialog design, but it is worth a look.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
How to draw a resizable rectangle
Posted: Tue Feb 07, 2006 07:42 PM

James:
Thank you. I had erased long ago my FW folder. I have re-installed it and found the program you suggested. I'm going to take a long look at it.
Thks
Rafael

Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
How to draw a resizable rectangle
Posted: Wed Feb 08, 2006 03:21 PM

James:

Thank you for your suggestion. Problem solved. The trick -in case it can be of use to anybody esle- is to use bMMoved() and bLClicked() together with DrawFocusRect() and call this last function twice: The first to erase the previous rectangle, the second to draw it in a sligtly different place.

Best regards,
Rafael

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
How to draw a resizable rectangle
Posted: Wed Feb 08, 2006 04:47 PM

Glad to hear you got it working.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 172
Joined: Fri Oct 07, 2005 12:00 PM
How to draw a resizable rectangle
Posted: Thu Feb 09, 2006 08:51 PM

Continue the discussion