Windows programming: What's the resizey grabby thing on the LR corner?

Posted by: tfabris

Windows programming: What's the resizey grabby thing on the LR corner? - 03/02/2015 20:37

Apple, for a very long time, had a little triangular doohickey at the lower right corner of each window, and to resize the window, you grabbed it and drug.

Windows, most of the time and still does, have a thing where you can grab any edge or corner of any window to resize.

Windows, in recent years, sometimes, only on some windows, only in some apps, you see a little copyright violation of Apple's windows in the lower right corner of the window and you can grab and drug that triangly thingy too. In addition to grabbing and drugging the edges.

Questions:
- Little triangle-y druggy grabby handley thingy doohickey in lower right window corner: WHAT IS ITS NAME?
- Can this thingy (whatever its namey shall be) be added by the Windows API to any window? Is it a built in thing in the API in recent years? Like, I dunno, set by a flag in the extended window styles by the SetWindowLong function or some such?

I tried googling for the latter, and was hampered in that process by the former.
Posted by: drakino

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 03/02/2015 21:09

https://developer.apple.com/library/mac/...000957-CH33-SW1

Currently called "Transient resize controls" as OS X has gotten rid of the fixed point to resize a window. Before it was called simply "resize control". This screenshot is from the OS X 10.4 Human Interface Guidelines (HIG).
Posted by: tfabris

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 03/02/2015 21:29

Excellent! Now I know what it's called.

Blast, though, that doesn't help me google the second question. Too general of a name.
Posted by: peter

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 03/02/2015 21:44

In Windowsland it seems to be called a sizebox or sizegrip. The "recent years" in which you've seen it are those since Windows 95 came out smile

Peter
Posted by: Shonky

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 03/02/2015 22:13

It's called a Size Grip
https://msdn.microsoft.com/en-us/library/windows/desktop/dd373644%28v=vs.85%29.aspx

Visual Studio seems to have the option of "Auto" as well as "Show" and "Hide" in form properties. I dont' know where Auto would take its setting from but my fairly clean (in terms of GUI) install of Windows 7, Auto=Hide.
Posted by: peter

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 04/02/2015 06:52

I do dimly remember, though, that we had to faff about a bit to get the "About" dialog in Rio Music Manager (which displayed all the lengthy open-source licences) to have a sizegrip.

Peter
Posted by: Roger

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 04/02/2015 09:12

Originally Posted By: peter
I do dimly remember, though, that we had to faff about a bit to get the "About" dialog in Rio Music Manager (which displayed all the lengthy open-source licences) to have a sizegrip.

Peter


We had to draw it by hand and then handle the WM_NCHITTEST message to return HTBOTTOMRIGHT.
Posted by: jmwking

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 04/02/2015 16:21

SMH. I love this board...

-jk
Posted by: tfabris

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 05/02/2015 07:32

Originally Posted By: Roger
We had to draw it by hand and then handle the WM_NCHITTEST message to return HTBOTTOMRIGHT.


That makes sense from a hack-it-to-make-it-work point of view. I may have to resort to that.

Do you remember if it was truly that simple? Or was there more to it than that?
Posted by: Roger

Re: Windows programming: What's the resizey grabby thing on the LR corner? - 05/02/2015 07:40

Originally Posted By: tfabris
Originally Posted By: Roger
We had to draw it by hand and then handle the WM_NCHITTEST message to return HTBOTTOMRIGHT.


That makes sense from a hack-it-to-make-it-work point of view. I may have to resort to that.

Do you remember if it was truly that simple? Or was there more to it than that?


I think that was all we needed to do. Might have needed to tweak the window style (WS_ flags) to get a resizable thin border. WM_NCHITTEST is, frankly, tragically underused, because it's awesome.

Note: it's _not_ a hack. This is exactly how Windows implements resizing -- DefWindowProc consumes WM_NCHITTEST and returns the relevant value. HTCAPTION is a good one, too -- makes the whole window draggable for free.