Resize a control dynamically in runtime using the mouse

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

Resize a control dynamically in runtime using the mouse

Post by RNBW »

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

Re: Resize a control dynamically in runtime using the mouse

Post by MrSwiss »

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: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Resize a control dynamically in runtime using the mouse

Post by jj2007 »

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

Re: Resize a control dynamically in runtime using the mouse

Post by RNBW »

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: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Resize a control dynamically in runtime using the mouse

Post by jj2007 »

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.
Post Reply