Resize a control dynamically in runtime using the mouse

General FreeBASIC programming questions.
RNBW
Posts: 187
Joined: Apr 11, 2015 11:06
Location: UK

Resize a control dynamically in runtime using the mouse

Postby RNBW » May 21, 2019 10:14

Is it possible in Freebasic, using a library or Windows API, to dynamically resize a control during runtime using the mouse?
MrSwiss
Posts: 3222
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Resize a control dynamically in runtime using the mouse

Postby MrSwiss » May 21, 2019 10:24

Yes, WIN-API code can do it (but, the code is no longer multi OS).

If multi OS is the intention, you'll have to use a external lib.
jj2007
Posts: 1216
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Resize a control dynamically in runtime using the mouse

Postby jj2007 » May 21, 2019 15:01

Search for WS_THICKFRAME.
RNBW
Posts: 187
Joined: Apr 11, 2015 11:06
Location: UK

Re: Resize a control dynamically in runtime using the mouse

Postby RNBW » May 21, 2019 16:44

Thanks Mr Swiss and jj2007

WS_THICKFRAME does give a resizeable editbox, but has the undesirable very thick border, whereas I am looking for a thin border. Is there anyway to achieve the ability to resize, but with a thin border?
jj2007
Posts: 1216
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Resize a control dynamically in runtime using the mouse

Postby jj2007 » May 21, 2019 19:10

OK, that makes it WM_NCHITTEST plus subclassing. Note, though, that there is a reason why WS_THICKFRAME is so thick: it's difficult to hit a thin line with the mouse.

Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests